fix(curriculum): changed test text to use should for JavaScript Algorithms and Data Structures (#37761)
* fix: corrected typo Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
committed by
Oliver Eyton-Williams
parent
9886cf7ca2
commit
2c15bcbb43
@ -36,7 +36,7 @@ Fix the condition so the program runs the right branch, and the appropriate valu
|
||||
tests:
|
||||
- text: Your code should fix the condition so it checks for equality, instead of using assignment.
|
||||
testString: assert(result == "Not equal!");
|
||||
- text: The condition can use either <code>==</code> or <code>===</code> to test for equality.
|
||||
- text: The condition should use either <code>==</code> or <code>===</code> to test for equality.
|
||||
testString: assert(code.match(/x\s*?===?\s*?y/g));
|
||||
|
||||
```
|
||||
|
@ -25,9 +25,9 @@ First, use <code>console.clear()</code> to clear the browser console. After that
|
||||
|
||||
```yml
|
||||
tests:
|
||||
- text: Use <code>console.clear()</code> to clear the browser console.
|
||||
- text: You should use <code>console.clear()</code> to clear the browser console.
|
||||
testString: const removeJSComments = code.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, ''); const noSpaces = removeJSComments.replace(/\s/g, ''); assert(noSpaces.match(/console.clear\(\)/));
|
||||
- text: Use <code>console.log()</code> to print the <code>output</code> variable.
|
||||
- text: You should use <code>console.log()</code> to print the <code>output</code> variable.
|
||||
testString: const noSpaces = code.replace(/\s/g, ''); assert(noSpaces.match(/console\.log\(output\)/));
|
||||
|
||||
```
|
||||
|
Reference in New Issue
Block a user