Popular, simple and painless JavaScript testing tool, powered by Facebook inc.
- Test runner assert library itself.
- Support
node
orjsdom
environment itself. - Support code coverage and rich reporters itself.
- In general, jest is a powerfull JavaScript testing tool.
-
cd jest
-
npm install
-
npm run test
PASS test/gretting.test.js
PASS test/jsdom.test.js
-------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
-------------|----------|----------|----------|----------|----------------|
All files | 100 | 100 | 66.67 | 100 | |
greeting.js | 100 | 100 | 100 | 100 | |
jsdom.js | 100 | 100 | 50 | 100 | |
-------------|----------|----------|----------|----------|----------------|
Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 1.011s
Ran all test suites.