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}`, () =>
fork icon14
star icon52
watch icon464

+ 7 other calls in file