fix(curriculum): update tests for Football Teams step 25 to accept both types of functions (#54381)

This commit is contained in:
Supravisor 2024-04-15 23:53:27 +12:00 committed by GitHub
parent 706c479b35
commit 55940f0fa6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,7 @@ assert.match(setPlayerCards.toString(), /arr\.map\(.*\)/);
Your `.map()` method should take an empty callback function.
```js
assert.match(code, /arr\.map\(\s*\(\s*\)\s*=>\s*\{\s*\}\s*\)/);
assert.match(code, /arr\.map\(\s*(\(\s*\)\s*=>|function\s*\(\s*\))\s*\{\s*\}\s*\)/);
```
You should use the `+=` operator on `playerCards.innerHTML`.
@ -36,7 +36,7 @@ assert.match(setPlayerCards.toString(), /playerCards\.innerHTML\s*\+=/);
You should assign `arr.map()` to the `playerCards.innerHTML` using the `+=` operator.
```js
assert.match(code, /playerCards\.innerHTML\s*\+=\s*arr\.map\(\s*\(\s*\)\s*=>\s*\{\s*\}\s*\)/)
assert.match(code, /playerCards\.innerHTML\s*\+=\s*arr\.map\(\s*(\(\s*\)\s*=>|function\s*\(\s*\))\s*\{\s*\}\s*\)/);
```
# --seed--