Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing branch #6

Merged
merged 10 commits into from Oct 1, 2021
Merged

Testing branch #6

merged 10 commits into from Oct 1, 2021

Conversation

Gambit142
Copy link
Owner

This branch uses the jest framework for testing the CRUD functions used to make the todo-list app run successfully.

I created two mock files called localstorage.js to imitate the functions of the browser's localStorage and crud.js to mock the CRUD functions.

I created a __tests__ folder and put a crud.test.js file in it. The test file checks if the following operations are performed successfully:

  • Mock HTML to test if add/delete functions add or remove exactly one
  • element to/from the list in the DOM.
  • create a function for editing the task description.
  • create a function for updating an item's 'completed' status.
  • create the "Clear all completed" function.

The tests for all the operations mentioned above were grouped in a description() method.

@Gambit142 Gambit142 merged commit 56d1b6d into master Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant