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 #4

Merged
merged 3 commits into from Feb 24, 2022
Merged

Testing #4

merged 3 commits into from Feb 24, 2022

Conversation

iLynette
Copy link
Owner

@iLynette iLynette commented Feb 24, 2022

  • In this project we implemented the following;

  • Use jest framework for testing.

  • Create a test file ([..].test.js) for a file containing the add item and delete item functions that we want to test.

  • Take a look at each of these functions. Are they pure functions? If the answer is "yes" then writing tests for them should be straightforward. Some of those functions however will update localStorage and manipulate the DOM. For those, you will need to use mocks:

  • Mock HTML to test if add/delete functions add or remove exactly one li element to/from the list in the DOM.

  • Make sure you group your tests using the describe() method.

Copy link

@ReshyResh ReshyResh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi team,

Your tests are passing and the project is complete! There is nothing else to say other than... it's time to merge it!

Congratulations! 🎉

Cheers and Happy coding!👏👏👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form

@iLynette iLynette merged commit 703ac9c into master Feb 24, 2022
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

3 participants