fix(curriculum): update tests to handle multiple valid solutions (#53387)

Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>
Co-authored-by: Jessica Wilkins <67210629+jdwilkin4@users.noreply.github.com>
This commit is contained in:
Sahil Chauhan
2024-02-01 18:42:37 +05:30
committed by GitHub
parent 33321b67ae
commit 42e6989650

View File

@@ -22,7 +22,7 @@ assert.match(code, /letters\.forEach\(/);
You should pass your `createLabel` function reference to the `.forEach()` method.
```js
assert.match(code, /letters\.forEach\(\s*createLabel\s*\)/);
assert.match(code, /letters\.forEach\(\s*(?:\(\s*([\S]*)\s*\)|\s*([\S]*))\s*=>\s*createLabel\(\s*\1\2\s*\)\s*\)|letters\.forEach\(\s*createLabel\s*\)/);
```
You should not pass a `createLabel` function call.