Skip to content

To-do-list clone for practicing in JEST testing. Two Milestones. Separate test files and mocked support functionality.

Notifications You must be signed in to change notification settings

petushka1/to-do-list-jest-testing

Repository files navigation

To Do List

Testing functionality

A Books manager webapp that lists existing records and allows user to add and remove to and from the books record.

TEST (Scope and Fllow)

⚡ ADD FUNCTION

✔️check array length after a new element added

✔️check <ul> children number after a new <li> created

✔️check new array element value toMatchObject

⚡ REMOVE FUNCTION

✔️check array length after an element removed

✔️check <ul> children number after <li> element removed

⚡ UPDATE FUNCTION

✔️ check li child :placeholder to equal test case value

✔️ check array[index].description to equal test case value

⚡ UPDATE COMPLETED STATUS FUNCTION

✔️ check the status of array element to change to true on checkbox.checked = true;

⚡ CLEAR ALL SELLECTED FUNCTION

✔️ check all completed li removed when function invoked;

✔️ check all corresponding array elements are removed;

Built With

  • html
  • css
  • JavaScript
  • Node.js
  • npm
  • jest

Getting Started

Use this repo as a reference or clone to customize for your own project.

Prerequisites

  • Must have a working computer
  • A Web-Browser installed (Chrome - Recommended)

Setup

  • Install a text editor which will work for you. I personally prefer Atom
  • Clone this project repository on your local computer. link
  • Open the project directory with Text Editor

Install

Open Terminal/Git Bash inside your and run

  npm install --force

Install Jest to run tests

  npm install --save-dev jest

Install JSDOM to manipulate document elements

  npm install --save-dev jsdom global-jsdom

Install Local Storage Mock to interact with local storage

  npm i --save-dev jest-localstorage-mock

Run linters tests

  • For hint tests, run
      npm run lint:hint
    
  • For style tests, run
      npm run lint:style
    
  • For eslint tests, run
      npm run lint:es
    

Authors

👤 Nadezhda

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Fellow Micronauts

About

To-do-list clone for practicing in JEST testing. Two Milestones. Separate test files and mocked support functionality.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published