Painless JavaScript Unit Testing built on top of the Jasmine test framework.
Familiar Approach: Built on top of the Jasmine test framework, using familiar expect(value).toBe(other) assertions
Mock by Default: Automatically mocks CommonJS modules returned by require(), making most existing code testable
Short Feedback Loop: DOM APIs are mocked and tests run in parallel via a small node.js command line utility
Note: You will use npm to install Jest. If you don't have npm you can get it by installing node.js which includes npm.
To install Jest:
$ npm install jest-cli --save-dev
package.json
{ ... "scripts": { "test": "jest" } ... }
__tests__/
npm test
[PASS] __tests__/name-of-your-test.js (0.015s)
There was an error while loading. Please reload this page.