mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-25 02:14:11 -05:00
fix(curriculum): Update test to accept solution with semicolon also (#53596)
Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3b2cb6391d
commit
44fb7c7c01
@@ -32,7 +32,7 @@ assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*(?:\(\s*
|
||||
You should add an empty callback function to the event listener. Remember to give it an `event` parameter.
|
||||
|
||||
```js
|
||||
assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*(?:\(\s*btn\s*\)|btn)\s*=>\s*\{\s*btn\s*\.\s*addEventListener\s*\(\s*('|"|`)click\1\s*,\s*(\(\s*event\s*\)|event)\s*=>\s*\{\s*\}\s*\)\s*\s*\}\s*\)/);
|
||||
assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*(?:\(\s*btn\s*\)|btn)\s*=>\s*\{\s*btn\s*\.\s*addEventListener\s*\(\s*('|"|`)click\1\s*,\s*(\(\s*event\s*\)|event)\s*=>\s*\{\s*\}\s*\)\s*;?\s*\}\s*\)/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user