Skip to content

subz390/listProcess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jest Testing Promises

MIT License Language Repl.it

This is a small project I created on writing Jest unit tests for pure Promise based functions in JavaScript.

Contributions are welcome, however before submitting a Pull Request please begin with an issue or discussion to discuss what you have in mind.

How To Run the Tests

Online

  • Head over to Repl.it
  • Click the Run button, wait for 15-30 seconds for the slow public server to do its thing
  • Or, manually run the scripts listed below.

Locally

  • Requirements: you'll need to have NodeJS and Git installed
  • clone this repo to a folder on your local computer
  • git clone https://github.com/subz390/listProcess.git
  • install the dependencies, npm install yarn install
  • and then you can run the scripts listed below

Scripts

  • npm run test in the bash console to run the test and view its results in the console.
  • npm run test:coverage to run the test and generate a coverage report.
  • npm run serve to start serving the coverage report web pages. Ctrl+C to stop the server. Open http://localhost:3000 in your browser.
  • npm run test+serve to do all the above.

For yarn, replace all the above npm with yarn.