Jasmine JS tutorial

Jasmine: a tutorial

What is Jasmine?

Jasmine is an automated testing framework for JavaScript.

1) You need to init an npm project. On the 5-th step of the wizard (question test command:) input jasmine
npm init
1b) If you init npm project before, make sure you have these lines in your package.json
"scripts": {
  "test": "jasmine"
},
2) Install jasmine as a local dependency
npm i --save-dev jasmine
3) To init jasmine (alternative for global jasmine init)
npm test init
4) To create example tests (alternative for global jasmine examples)
npm test examples
5) To run tests (alternative for global jasmine)
npm test 

0 pensamientos:

Post a Comment

feedback!