From 43865fc098e6dd9b418f5e3013375f762b76c18f Mon Sep 17 00:00:00 2001
From: Nicholas Carrigan <63889819+nhcarrigan@users.noreply.github.com>
Date: Sat, 6 Jun 2020 02:52:46 -0700
Subject: [PATCH] fix(learn): function must return boolean, not string.
(#39010)
---
...check-for-the-presence-of-an-element-with-indexof.english.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-for-the-presence-of-an-element-with-indexof.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-for-the-presence-of-an-element-with-indexof.english.md
index 69a84ba109..dc6110c0d9 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-for-the-presence-of-an-element-with-indexof.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-for-the-presence-of-an-element-with-indexof.english.md
@@ -31,6 +31,8 @@ fruits.indexOf('pears'); // returns 1, the first index at which the element exis
```yml
tests:
+ - text: The quickCheck
function should return a boolean (true
or false
), not a string ("true"
or "false"
)
+ testString: assert.isBoolean(quickCheck(['squash', 'onions', 'shallots'], 'mushrooms'));
- text: quickCheck(["squash", "onions", "shallots"], "mushrooms")
should return false
testString: assert.strictEqual(quickCheck(['squash', 'onions', 'shallots'], 'mushrooms'), false);
- text: quickCheck(["onions", "squash", "shallots"], "onions")
should return true