diff --git a/README.md b/README.md index 0dd3e7b..a41e10a 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,10 @@ Passing in the config overrides any default values or values set by bot-tester.j // each filter returns false for messages that the BotTester should ignore messageFilters: ((message:IMessage) => boolean)[], ignoreTypingEvent: boolean, - ignoreEndOfConversationEvent: boolean + ignoreEndOfConversationEvent: boolean, + // Setting this to true will cause checkSession to hang and test to fail. + ignoreInternalSveMessage?: boolean; + } ``` if timeout is defined, then a particular ```runTest()``` call will fail if it does not receive each expected message within the timeout period of time set in the options. diff --git a/src/config.ts b/src/config.ts index 744f1fd..954f2d0 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,5 +1,6 @@ import { IAddress, IMessage } from 'botbuilder'; import * as fs from 'fs'; +import { ignoreInternalSaveMessageFilter } from './builtInMessageFilters'; /** * Returns true if a message @@ -26,6 +27,12 @@ export interface IConfig { */ ignoreEndOfConversationEvent?: boolean; + /** + * ignores the internal __save__ message. Setting this to true will cause checkSession to hang and test to fail + */ + // this is explicitly not added as a chained builder function to disaude consumers from using this. + ignoreInternalSveMessage?: boolean; + /** * filters for messages that the BotTester framework should use */ @@ -56,4 +63,8 @@ if (configFileExists) { configInternal.messageFilters = []; +if (configInternal.ignoreInternalSveMessage) { + configInternal.messageFilters.push(ignoreInternalSaveMessageFilter); +} + export const config = configInternal;