mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
fix(curriculum): fix tests for step 6 of the todo project (#54626)
Co-authored-by: Deep <deep.dhanuka1@myntra.com> Co-authored-by: Jessica Wilkins <67210629+jdwilkin4@users.noreply.github.com>
This commit is contained in:
co-authored by
Deep
Jessica Wilkins
parent
50d7f03763
commit
9ac95765c8
+3
-1
@@ -40,7 +40,9 @@ 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*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*;)/)
|
||||
assert(taskForm.classList.contains('hidden'));
|
||||
openTaskFormBtn.click();
|
||||
assert(!taskForm.classList.contains('hidden'));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user