Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 11 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { IAddress, IMessage } from 'botbuilder';
import * as fs from 'fs';
import { ignoreInternalSaveMessageFilter } from './builtInMessageFilters';

/**
* Returns true if a message
Expand All @@ -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
*/
Expand Down Expand Up @@ -56,4 +63,8 @@ if (configFileExists) {

configInternal.messageFilters = [];

if (configInternal.ignoreInternalSveMessage) {
configInternal.messageFilters.push(ignoreInternalSaveMessageFilter);
}

export const config = configInternal;