Closed Goldinium closed 11 months ago
Used jest framework for testing.
Create a test file functions.test.js for a file containing the add item and delete item functions to test.
functions.test.js
Mocked HTML to test if add/delete functions add or remove exactly one <li> element to/from the list in the DOM.
<li>
Made sure to group tests using the describe() method.
Thanks
Used jest framework for testing.
Create a test file
functions.test.js
for a file containing the add item and delete item functions to test.Mocked HTML to test if add/delete functions add or remove exactly one
<li>
element to/from the list in the DOM.Made sure to group tests using the describe() method.
Thanks