Skip to content

front-camp-2021/js-module-RegusGen

Repository files navigation

JavaScript module

To start project:

To start project, please run the next commands:

  • npm install - install dependencies

Note: You must have installed Nodejs and Npm on your local machine
To check versions of Nodejs and Npm please run in terminal: node -v и npm -v
Required versions:

  "engines": {
    "node": ">=14.0.0",
    "npm": ">=6.0.0"
  }
  • npm run start:backend - start backend server
  Resources
  http://localhost:3000/products
  http://localhost:3000/categories
  http://localhost:3000/brands

  Home
  http://localhost:3000

To run tests:

To run all tests

To run all project tests:

npm test

asciicast

To run tests from a specific directory

Please use next command to run tests from a specific directory

npm test -- --findRelatedTests <path>

For example, the next command runs all "spec" files from "01-sum" directory:

npm test -- --findRelatedTests 01-sum/**/*.spec.js

where 01-sum/**/*.spec.js is a path to task directory

asciicast

To run a single test

To run only one test, please use next command:

npm test -- -t '<describeString> <itString>'

  • describeString is a name of "describe" block
  • itStringis a name of "it" block

For example, next command runs "describe" with name "sum" and "it" with name "should return sum of numbers":

npm test -- -t 'sum should return sum of numbers'

asciicast

For more details please check official Jest documentation Jest

About

js-module-RegusGen created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published