i am on the information security and Assurance curriculum now,
i passed the challenge as the code below:
I wonder why the answer (‘dart’, ‘queue’, “But a dart doesn’t contain a queue”) is notInclude rather than include, obviously there is dart and queue in the String?
/** 14 - #include (on #notInclude ) works for strings too !! **/
// It asserts that the actual string contains the expected substring
test('String #include, #notInclude', function() {
assert.include('Arrow', 'row', "Arrow contains row...");
assert.notInclude('dart', 'queue', "But a dart doesn't contain a queue");
});
Thanks, Challenge URL : https://learn.freecodecamp.org/information-security-and-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-string-contains-a-substring