Test
integration testing
Unit testing
functional testing
Jest
we hava a xxx.js
create a xxx.test.js


Using Babel
To use Babel, install required dependencies via yarn
"dependencies": { "babel-core": "^6.26.3", "babel-jest": "^23.6.0", "babel-preset-env": "^1.7.0", "jest": "^24.0.0" }

Using webpack
Jest can be used in projects that use webpack to manage assets, styles, and compilation.
Common Matchers
The simplest way to test a value is with exact equality.



Last updated
Was this helpful?