mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
fix(curriculum): update test of TODO step 6 to allow for multiple function answers (#54371)
This commit is contained in:
parent
4c87604ecc
commit
f7dbd84351
@ -40,7 +40,7 @@ assert.match(code, /openTaskFormBtn\.addEventListener\(\s*('|"|`)click\1/)
|
||||
Your event listener's callback function should use the `classList.toggle()` method to toggle the `hidden` class on the `taskForm` element. Refer back to the example provided in the description.
|
||||
|
||||
```js
|
||||
assert.match(code, /openTaskFormBtn\.addEventListener\(\s*('|"|`)click\1\s*,\s*\(\s*\)\s*=>\s*(?:{\s*taskForm\s*\.classList\s*\.\s*toggle\s*\(\s*('|"|`)hidden\2\s*\)\s*;?\s*}|\s*taskForm\s*\.classList\s*\.\s*toggle\s*\(\s*('|"|`)hidden\3\s*\)\s*;?\s*)\s*\)\s*;?/)
|
||||
assert.match(code, /openTaskFormBtn\.addEventListener\(\s*('|"|`)click\1\s*,\s*(?:\(\s*\)\s*=>\s*taskForm\s*\.classList\s*\.\s*toggle\s*\(\s*('|"|`)hidden\2\s*\)\s*\)|\s*function\s*\(\s*\)\s*\s*{\s*taskForm\s*\.classList\s*\.\s*toggle\s*\(\s*('|"|`)hidden\3\s*\)\s*}\s*\)\s*;)/)
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Loading…
Reference in New Issue
Block a user