How to use the include function from chai
Find comprehensive JavaScript chai.include code examples handpicked from public code repositorys.
94 95 96 97 98 99 100 101 102 103
function shouldContain(shouldOrNot, expected, expectedReprompt) { test.checks.push((testCase) => { const actuals = getActuals(testCase); if (paramPassed(expected)) { it(`Alexa's ${type} response should ${not(shouldOrNot)}contain: ${expected}`, () => shouldOrNot ? assert.include(actuals.speech, expected) : assert.notInclude(actuals.speech, expected) ); } if (paramPassed(expectedReprompt)) { it(`Alexa's ${type} reprompt should ${not(shouldOrNot)}contain: ${expectedReprompt}`, () =>
14
52
464
+ 7 other calls in file
chai.expect is the most popular function in chai (8749 examples)