jest set go..


Jest is used by Facebook to test all JavaScript code including React applications. One of Jest's philosophies is to provide an integrated "zero-configuration" experience. It is pretty much similar to Jasmine
Some of the advantages are:
1) Fast and sandboxed
2) Built-in code coverage reports
3) Zero config
4) Powerful mocking library
5) Works with typescript
Youtube link
As a tester if you want to go about it then installation is as easy as:
   In your directory:
   npm init
   npm install --save-dev jest
Now create a directotry with name __test__ . jest naming convention requires test directory to be named __test__
package.json

example:
filename is jest_test_01.js

run:
npm run myjesttest jest_test_01
output:
Note: if instead of 'test' we use 'test.only' then only this test is executed and rest all skipped

Happy jesting

Comments

Popular Posts