mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-12 19:00:43 -04:00
fix(cirriculum): fix tests to allow for multiple correct solutions for step 97 OOP game (#53295)
Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>
This commit is contained in:
@@ -24,13 +24,13 @@ assert.match(code, /\bcheckpoints\b\s*\.\s*forEach\s*\(/s);
|
||||
You should have a `checkpoint` parameter inside the `forEach` callback function.
|
||||
|
||||
```js
|
||||
assert.match(code, /\s*checkpoints\s*\.\s*forEach\s*\(\s*checkpoint\s*=>\s*{/s);
|
||||
assert.match(code, /\s*checkpoints\s*\.\s*forEach\s*\(\s*(\(\s*checkpoint\s*\)|checkpoint)\s*=>\s*{?/s);
|
||||
```
|
||||
|
||||
You should call the `draw` method on each `checkpoint` inside the `forEach` callback function.
|
||||
|
||||
```js
|
||||
assert.match(code, /\s*checkpoints\.forEach\s*\(\s*checkpoint\s*=>\s*{\s*checkpoint\.draw\(\s*\);?\s*}\s*\);?/s);
|
||||
assert.match(code, /\s*checkpoints\.forEach\s*\(\s*(\(\s*checkpoint\s*\)|checkpoint)\s*=>\s*(\{\s*checkpoint\.draw\(\s*\)\s*;?\s*\}|checkpoint\.draw\(\s*\))\s*\)\s*;?/s);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user