diff --git a/libraries/botbuilder-dialogs-adaptive-testing/eslint.config.cjs b/libraries/botbuilder-dialogs-adaptive-testing/eslint.config.cjs deleted file mode 100644 index 63647b52cc..0000000000 --- a/libraries/botbuilder-dialogs-adaptive-testing/eslint.config.cjs +++ /dev/null @@ -1,10 +0,0 @@ -const onlyWarn = require("eslint-plugin-only-warn"); -const sharedConfig = require("../../eslint.config.cjs") - -module.exports = [ - ...sharedConfig, - { - plugins: { - "only-warn": onlyWarn, - }, - }]; diff --git a/libraries/botbuilder-dialogs-adaptive-testing/package.json b/libraries/botbuilder-dialogs-adaptive-testing/package.json index c152be89b8..5895e15204 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/package.json +++ b/libraries/botbuilder-dialogs-adaptive-testing/package.json @@ -7,7 +7,7 @@ "build": "tsc -b", "clean": "rimraf _ts3.4 lib tsconfig.tsbuildinfo", "depcheck": "depcheck --config ../../.depcheckrc", - "lint": "eslint .", + "lint": "eslint . --config ../../eslint.config.cjs", "postbuild": "downlevel-dts lib _ts3.4/lib --checksum", "test": "npm-run-all build test:mocha", "test:mocha": "mocha tests/*.test.js", @@ -32,7 +32,6 @@ "botbuilder-dialogs-adaptive-runtime-core": "4.1.6", "botbuilder-dialogs-declarative": "4.1.6", "botbuilder-stdlib": "4.1.6", - "eslint-plugin-only-warn": "^1.1.0", "murmurhash-js": "^1.0.0", "nock": "^13.5.5", "url-parse": "^1.5.10", diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/actions/assertCondition.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/actions/assertCondition.ts index a8b3acd773..4b44b2d734 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/actions/assertCondition.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/actions/assertCondition.ts @@ -42,7 +42,6 @@ export class AssertCondition extends Dialog implements * * @param property Properties that extend RecognizerConfiguration. * @returns Expression converter. - * */ getConverter(property: keyof AssertConditionConfiguration): Converter | ConverterFactory { switch (property) { diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/adaptiveTestBotComponent.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/adaptiveTestBotComponent.ts index 7eddf59a77..ee92efc65c 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/adaptiveTestBotComponent.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/adaptiveTestBotComponent.ts @@ -61,7 +61,7 @@ export class AdaptiveTestBotComponent extends BotComponent { { kind: AssertTelemetryContains.$kind, type: AssertTelemetryContains }, ]; }, - }) + }), ); } } diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockHttpRequestMiddleware.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockHttpRequestMiddleware.ts index 3c44cbd4a4..f029948b03 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockHttpRequestMiddleware.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockHttpRequestMiddleware.ts @@ -71,7 +71,7 @@ export class MockHttpRequestMiddleware implements Middleware { const origins = new Set( this._httpRequestMocks .filter((mock) => mock instanceof HttpRequestSequenceMock) - .map((mock: HttpRequestSequenceMock) => parse(mock.url).origin) + .map((mock: HttpRequestSequenceMock) => parse(mock.url).origin), ); // call fallback functions if mocks not catched diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisExtensions.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisExtensions.ts index 3422b7cf5e..f6fbd49b3d 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisExtensions.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisExtensions.ts @@ -52,7 +52,7 @@ function flattenSettings(settings: Record): Record */ export function useMockLuisSettings( directory: string, - endpoint = 'https://westus.api.cognitive.microsoft.com' + endpoint = 'https://westus.api.cognitive.microsoft.com', ): Record { const files = fs.readdirSync(directory); const settings = files diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisLoader.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisLoader.ts index 3b9cb9d65f..5da35127b3 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisLoader.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisLoader.ts @@ -24,7 +24,10 @@ export class MockLuisLoader implements CustomDeserializer} _configuration Configuration to use. */ - constructor(private _resourceExplorer: ResourceExplorer, private _configuration?: Record) {} + constructor( + private _resourceExplorer: ResourceExplorer, + private _configuration?: Record, + ) {} /** * @param config Config to recognize intents and entities in a users utterance. @@ -36,7 +39,7 @@ export class MockLuisLoader implements CustomDeserializer( - `${externalEntityRecognizer}.dialog` + `${externalEntityRecognizer}.dialog`, ); } let name = recognizer.applicationId.toString(); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisRecognizer.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisRecognizer.ts index b2b240f517..b7813d8b44 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisRecognizer.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/mocks/mockLuisRecognizer.ts @@ -85,7 +85,7 @@ export class MockLuisRecognizer extends Recognizer { dialogContext: DialogContext, activity: Activity, telemetryProperties?: Record, - telemetryMetrics?: Record + telemetryMetrics?: Record, ): Promise { const options = this._recognizer.recognizerOptions(dialogContext); options.includeAPIResults = true; @@ -164,7 +164,7 @@ export class MockLuisRecognizer extends Recognizer { private async _fallback( _request: HttpRequestMessage, utterance: string, - options: LuisRecognizerOptionsV3 + options: LuisRecognizerOptionsV3, ): Promise { const responsePath: string = this._responsePath(utterance, options); if (fs.existsSync(responsePath)) { diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testAction.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testAction.ts index e179bd15a8..b00c836e21 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testAction.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testAction.ts @@ -22,6 +22,6 @@ export abstract class TestAction extends Configurable { abstract execute( adapter: TestAdapter, callback: (context: TurnContext) => Promise, - inspector?: Inspector + inspector?: Inspector, ): void; } diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertNoActivity.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertNoActivity.ts index b8f8f23844..0496c6b0d1 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertNoActivity.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertNoActivity.ts @@ -43,7 +43,7 @@ export class AssertNoActivity extends TestAction implements AssertNoActivityConf async execute( adapter: TestAdapter, _callback: (context: TurnContext) => Promise, - _inspector?: Inspector + _inspector?: Inspector, ): Promise { if (adapter.activeQueue.length > 0) { throw new Error(this.getConditionDescription()); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReply.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReply.ts index de8a2c6bcd..1fe31a32cd 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReply.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReply.ts @@ -49,7 +49,7 @@ export class AssertReply extends AssertReplyActivity implements AssertReplyConfi if (this.exact) { if (activity.type == ActivityTypes.Message && activity.text != this.text) { throw new Error( - this.description || `Text ${activity.text} didn't match expected text: ${this.text}` + this.description || `Text ${activity.text} didn't match expected text: ${this.text}`, ); } } else { @@ -58,7 +58,7 @@ export class AssertReply extends AssertReplyActivity implements AssertReplyConfi !activity.text.toLowerCase().trim().includes(this.text.toLowerCase().trim()) ) { throw new Error( - this.description || `Text ${activity.text} didn't match expected text: ${this.text}` + this.description || `Text ${activity.text} didn't match expected text: ${this.text}`, ); } } diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReplyActivity.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReplyActivity.ts index 0b3ef33b47..4c695beee5 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReplyActivity.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReplyActivity.ts @@ -75,10 +75,10 @@ export class AssertReplyActivity extends TestAction implements AssertReplyActivi async execute( testAdapter: TestAdapter, _callback: (context: TurnContext) => Promise, - _inspector?: Inspector + _inspector?: Inspector, ): Promise { const start = new Date(); - /* eslint-disable no-constant-condition */ + while (true) { const current = new Date(); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReplyOneOf.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReplyOneOf.ts index fcb0fd4c1a..acebe1c66b 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReplyOneOf.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertReplyOneOf.ts @@ -67,7 +67,7 @@ export class AssertReplyOneOf extends AssertReplyActivity implements AssertReply if (!found) { throw new Error( - this.description || `Text ${activity.text} didn't match one of expected text: ${this.text.join('\n')}` + this.description || `Text ${activity.text} didn't match one of expected text: ${this.text.join('\n')}`, ); } diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertTelemetryContains.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertTelemetryContains.ts index a301b39a67..099f399a3b 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertTelemetryContains.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/assertTelemetryContains.ts @@ -42,7 +42,7 @@ export class AssertTelemetryContains extends TestAction implements AssertTelemet async execute( _adapter: TestAdapter, _callback: (context: TurnContext) => Promise, - inspector?: Inspector + inspector?: Inspector, ): Promise { if (inspector) { await inspector((dc) => { diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/customEvent.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/customEvent.ts index ab6dff462f..ce735e53e4 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/customEvent.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/customEvent.ts @@ -40,7 +40,7 @@ export class CustomEvent extends TestAction implements CustomEventC async execute( testAdapter: TestAdapter, callback: (context: TurnContext) => Promise, - _inspector?: Inspector + _inspector?: Inspector, ): Promise { if (!this.name) { throw Error('You must define the event name.'); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/memoryAssertions.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/memoryAssertions.ts index 529b370cd0..c4cb3b85bd 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/memoryAssertions.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/memoryAssertions.ts @@ -42,7 +42,7 @@ export class MemoryAssertions extends TestAction implements MemoryAssertionsConf async execute( _adapter: TestAdapter, _callback: (context: TurnContext) => Promise, - inspector?: Inspector + inspector?: Inspector, ): Promise { if (inspector) { await inspector((dc) => { diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/setProperties.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/setProperties.ts index e734b3f4dc..c5dcffe661 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/setProperties.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/setProperties.ts @@ -70,7 +70,7 @@ export class SetProperties extends TestAction { async execute( _adapter: TestAdapter, _callback: (context: TurnContext) => Promise, - inspector?: Inspector + inspector?: Inspector, ): Promise { if (inspector) { await inspector((dc) => { diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userActivity.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userActivity.ts index 03ec7a83e5..e3ebed3469 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userActivity.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userActivity.ts @@ -42,7 +42,7 @@ export class UserActivity extends TestAction implements UserActivityConfiguratio async execute( testAdapter: TestAdapter, callback: (context: TurnContext) => Promise, - _inspector?: Inspector + _inspector?: Inspector, ): Promise { if (!this.activity) { throw new Error('You must define one of Text of Activity properties'); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userConversationUpdate.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userConversationUpdate.ts index 68125123be..97da44bb5f 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userConversationUpdate.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userConversationUpdate.ts @@ -41,7 +41,7 @@ export class UserConversationUpdate extends TestAction implements UserConversati async execute( testAdapter: TestAdapter, callback: (context: TurnContext) => Promise, - _inspector?: Inspector + _inspector?: Inspector, ): Promise { const activity = testAdapter.makeActivity(); activity.type = ActivityTypes.ConversationUpdate; diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userDelay.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userDelay.ts index 6a16047afc..fb46dd7c68 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userDelay.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userDelay.ts @@ -35,7 +35,7 @@ export class UserDelay extends TestAction implements UserDelayConfiguration { async execute( _testAdapter: TestAdapter, _callback: (context: TurnContext) => Promise, - _inspector?: Inspector + _inspector?: Inspector, ): Promise { await Promise.resolve((resolve) => setTimeout(resolve, this.timespan)); } diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userSays.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userSays.ts index 3ffebcd254..a9c085feb4 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userSays.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userSays.ts @@ -46,7 +46,7 @@ export class UserSays extends TestAction implements UserSaysConfiguration { async execute( testAdapter: TestAdapter, callback: (context: TurnContext) => Promise, - _inspector?: Inspector + _inspector?: Inspector, ): Promise { if (!this.text) { throw new Error('You must define the text property'); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userTyping.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userTyping.ts index 16d6927afa..bb5172dfbd 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userTyping.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testActions/userTyping.ts @@ -36,7 +36,7 @@ export class UserTyping extends Configurable implements TestAction, UserTypingCo async execute( testAdapter: TestAdapter, callback: (context: TurnContext) => Promise, - _inspector?: Inspector + _inspector?: Inspector, ): Promise { const typing = testAdapter.makeActivity(); typing.type = ActivityTypes.Typing; diff --git a/libraries/botbuilder-dialogs-adaptive-testing/src/testScript.ts b/libraries/botbuilder-dialogs-adaptive-testing/src/testScript.ts index 8810dad51b..cf53372cbc 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/src/testScript.ts +++ b/libraries/botbuilder-dialogs-adaptive-testing/src/testScript.ts @@ -218,7 +218,7 @@ export class TestScript extends Configurable implements TestScriptConfiguration const activity = TurnContext.applyConversationReference( { name: 'inspector', type: ActivityTypes.Event }, adapter.conversation, - true + true, ); await adapter.processActivity(activity, async (turnContext) => await di.inspect(turnContext, inspector)); }; diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/action.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/action.test.js index a89ce8c7b1..5fb1a49151 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/action.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/action.test.js @@ -123,6 +123,7 @@ class SetSkillBotFrameworkClientMiddleware { describe('ActionTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('ActionTests', LanguageGenerationBotComponent); }); @@ -158,7 +159,7 @@ describe('ActionTests', function () { undefined, undefined, new SetSkillConversationIdFactoryBaseMiddleware(), - new SetSkillBotFrameworkClientMiddleware() + new SetSkillBotFrameworkClientMiddleware(), ); }); @@ -214,7 +215,7 @@ describe('ActionTests', function () { undefined, undefined, new SetSkillConversationIdFactoryBaseMiddleware(), - new SetSkillBotFrameworkClientMiddleware() + new SetSkillBotFrameworkClientMiddleware(), ); }); @@ -400,8 +401,8 @@ describe('ActionTests', function () { Object.assign({}, [ { text: 'Joe is 52', age: 52 }, { text: 'text', age: 11 }, - ]) - ) + ]), + ), ) .reply(200, 'array'); nock('http://foo.com') diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/actionScope.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/actionScope.test.js index f2ff2ae421..98b20760b5 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/actionScope.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/actionScope.test.js @@ -3,6 +3,7 @@ const { makeResourceExplorer } = require('./utils'); describe('ActionScopeTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('ActionScopeTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/adaptiveDialog.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/adaptiveDialog.test.js index bba70f36c1..2636a5540a 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/adaptiveDialog.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/adaptiveDialog.test.js @@ -3,6 +3,7 @@ const { makeResourceExplorer } = require('./utils'); describe('AdaptiveDialogTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('AdaptiveDialogTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/conditionals.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/conditionals.test.js index 9d5bcdd9c0..a206d8c5d7 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/conditionals.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/conditionals.test.js @@ -5,6 +5,7 @@ const { LuisAdaptiveRecognizer, LuisBotComponent } = require('botbuilder-ai'); describe('ConditionalsTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('ConditionalsTests'); }); @@ -24,7 +25,7 @@ describe('ConditionalsTests', function () { resourceExplorer.registerType( LuisAdaptiveRecognizer.$kind, MockLuisRecognizer, - new MockLuisLoader(resourceExplorer, config) + new MockLuisLoader(resourceExplorer, config), ); await TestUtils.runTestScript(resourceExplorer, 'ChooseEntity', undefined, config); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/crossTrainedRecognizerSet.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/crossTrainedRecognizerSet.test.js index f6bce77b81..eab2a9f46e 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/crossTrainedRecognizerSet.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/crossTrainedRecognizerSet.test.js @@ -49,12 +49,13 @@ const getDialogContext = (testName, text, locale = 'en-us') => { from: bot, locale, }), - {} + {}, ); }; describe('CrossTrainedRecognizerSetTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('CrossTrainedRecognizerSetTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/functions.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/functions.test.js index e118b12323..28cb578a94 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/functions.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/functions.test.js @@ -3,6 +3,7 @@ const { makeResourceExplorer } = require('./utils'); describe('ActionScopeTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('FunctionsTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/injectLG.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/injectLG.test.js index 96fc120bb2..94c6e2652e 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/injectLG.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/injectLG.test.js @@ -3,6 +3,7 @@ const { makeResourceExplorer } = require('./utils'); describe('ActionScopeTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('InjectLGTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/lgGenerators.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/lgGenerators.test.js index 0ed48c726b..45743cbd8a 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/lgGenerators.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/lgGenerators.test.js @@ -3,6 +3,7 @@ const { makeResourceExplorer } = require('./utils'); describe('LGGeneratorTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('LGGeneratorTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/misc.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/misc.test.js index 759d3365f3..ad47cc2ba9 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/misc.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/misc.test.js @@ -3,6 +3,7 @@ const { makeResourceExplorer } = require('./utils'); describe('MiscTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('MiscTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/multiLanguageGeneratorTests.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/multiLanguageGeneratorTests.test.js index b4a6d9f08e..a364f3aa89 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/multiLanguageGeneratorTests.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/multiLanguageGeneratorTests.test.js @@ -3,6 +3,7 @@ const { makeResourceExplorer } = require('./utils'); describe('MultiLanguageGeneratorTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('MultiLanguageGeneratorTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/multiLanguageRecognizer.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/multiLanguageRecognizer.test.js index 788e30323a..22d78d2216 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/multiLanguageRecognizer.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/multiLanguageRecognizer.test.js @@ -25,6 +25,7 @@ const createRecognizer = () => describe('MultiLanguageRecognizerTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('MultiLanguageRecognizerTests'); }); @@ -48,7 +49,7 @@ describe('MultiLanguageRecognizerTests', function () { it('EnUsFallback_AcitivtyLocaleCasing', async function () { await TestUtils.runTestScript( resourceExplorer, - 'MultiLanguageRecognizerTest_EnUsFallback_ActivityLocaleCasing' + 'MultiLanguageRecognizerTest_EnUsFallback_ActivityLocaleCasing', ); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/qnaMakerRecognizer.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/qnaMakerRecognizer.test.js index 362bb44465..c84f192ed4 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/qnaMakerRecognizer.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/qnaMakerRecognizer.test.js @@ -6,6 +6,7 @@ const { makeResourceExplorer } = require('./utils'); describe('QnAMakerRecognizerTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('QnAMakerRecognizerTests', QnAMakerBotComponent); }); @@ -24,7 +25,7 @@ describe('QnAMakerRecognizerTests', function () { .post(/knowledgebases/) .replyWithFile( 200, - path.join(__dirname, 'resources/QnAMakerRecognizerTests/QnaMaker_ReturnsAnswerWithIntent.json') + path.join(__dirname, 'resources/QnAMakerRecognizerTests/QnaMaker_ReturnsAnswerWithIntent.json'), ); await TestUtils.runTestScript(resourceExplorer, 'QnAMakerRecognizerTests_ReturnsAnswerWithIntent'); }); @@ -34,7 +35,7 @@ describe('QnAMakerRecognizerTests', function () { .post(/knowledgebases/) .replyWithFile( 200, - path.join(__dirname, 'resources/QnAMakerRecognizerTests/QnaMaker_ReturnsNoAnswer.json') + path.join(__dirname, 'resources/QnAMakerRecognizerTests/QnaMaker_ReturnsNoAnswer.json'), ); await TestUtils.runTestScript(resourceExplorer, 'QnAMakerRecognizerTests_ReturnsNoAnswer'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/recognizerSet.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/recognizerSet.test.js index 92f1ee164c..ef8a1eb5df 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/recognizerSet.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/recognizerSet.test.js @@ -31,7 +31,7 @@ const createRecognizer = () => new NumberEntityRecognizer(), new PercentageEntityRecognizer(), new PhoneNumberEntityRecognizer(), - new TemperatureEntityRecognizer() + new TemperatureEntityRecognizer(), ), }), new RegexRecognizer().configure({ @@ -41,7 +41,7 @@ const createRecognizer = () => new UrlEntityRecognizer(), new RegexEntityRecognizer('color', '(?i)(red|green|blue|purple|orange|violet|white|black)'), new RegexEntityRecognizer('backgroundColor', '(?i)(back|background)'), - new RegexEntityRecognizer('foregroundColor', '(?i)(foreground|front) {color}') + new RegexEntityRecognizer('foregroundColor', '(?i)(foreground|front) {color}'), ), }), ], @@ -49,6 +49,7 @@ const createRecognizer = () => describe('RecognizerSetTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('RecognizerSetTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/recognizerTelemetryUtils.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/recognizerTelemetryUtils.js index 99a6b695e2..ed08124382 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/recognizerTelemetryUtils.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/recognizerTelemetryUtils.js @@ -130,7 +130,7 @@ const validateTelemetry = async ({ recognizer, dialogContext, spy, activity, res strictEqual(actualTelemetryProps.name, `${recognizer.constructor.name}Result`); ok( hasValidTelemetryProps(actualTelemetryProps.properties, expectedTelemetryProps), - 'Expected telemetry property did not match actual telemetry property logged.' + 'Expected telemetry property did not match actual telemetry property logged.', ); }; diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/regexRecognizer.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/regexRecognizer.test.js index 5fb1809859..857aa67a18 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/regexRecognizer.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/regexRecognizer.test.js @@ -3,6 +3,7 @@ const { makeResourceExplorer } = require('./utils'); describe('RegexRecognizerTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('RegexRecognizerTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/selector.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/selector.test.js index 8c31df76ae..ce13d2c8e1 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/selector.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/selector.test.js @@ -3,6 +3,7 @@ const { makeResourceExplorer } = require('./utils'); describe('SelectorTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('SelectorTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/settingsState.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/settingsState.test.js index a14375320d..d6a6e1ebe3 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/settingsState.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/settingsState.test.js @@ -3,6 +3,7 @@ const { makeResourceExplorer } = require('./utils'); describe('SettingsStateTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('SettingsStateTests'); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/testScript.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/testScript.test.js index 836b328bbe..9586a38c58 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/testScript.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/testScript.test.js @@ -6,6 +6,7 @@ const { makeResourceExplorer } = require('./utils'); describe('TestScriptTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('TestScriptTests', QnAMakerBotComponent); }); @@ -24,7 +25,7 @@ describe('TestScriptTests', function () { (err) => { assert(err.message.includes('undefined text.length == 0 {"type":"message","text":"hi User1"')); return true; - } + }, ); }); @@ -74,7 +75,7 @@ describe('TestScriptTests', function () { resourceExplorer.registerType( LuisAdaptiveRecognizer.$kind, MockLuisRecognizer, - new MockLuisLoader(resourceExplorer, config) + new MockLuisLoader(resourceExplorer, config), ); await TestUtils.runTestScript(resourceExplorer, 'TestScriptTests_HttpRequestLuisMock', undefined, config); }); diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/valueRecognizer.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/valueRecognizer.test.js index 30e155fabb..b11a4f87dc 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/valueRecognizer.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/valueRecognizer.test.js @@ -3,6 +3,7 @@ const { makeResourceExplorer } = require('./utils'); describe('ValueRecognizerTests', function () { let resourceExplorer; + before(function () { resourceExplorer = makeResourceExplorer('ValueRecognizerTests'); });