From 9ac95765c8e47b71248cda4721c46a8f66c17493 Mon Sep 17 00:00:00 2001 From: Deep Dhanuka <42740971+Deep512@users.noreply.github.com> Date: Tue, 7 May 2024 22:57:16 +0530 Subject: [PATCH] fix(curriculum): fix tests for step 6 of the todo project (#54626) Co-authored-by: Deep Co-authored-by: Jessica Wilkins <67210629+jdwilkin4@users.noreply.github.com> --- .../64e4e78a7ea4a168de4e6a38.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md index 555dae33a4e..9cafc4b1195 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md @@ -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--