KEMBAR78
Unit Testing with Jest | PDF
Unit Testing with JEST
Maayan Glikser
What Is Jest?
Why do we need
another test framework?
karma
karma-webpack
karma-mocha
karma-sinon-chai
karma-sinon-stub-promise
karma-sourcemap-loader
karma-clear-screen-reporter
karma-chrome-launcher
karma-phantomjs-launcher
babel-plugin-rewire
isparta-loader
istanbul-instrumenter-loader
phantomjs-prebuilt
sinon
sinon-chai
sinon-stub-promise
Unit Testing
Concepts
What is a Unit Test
Unit of
Code
Input Output
Expected
Result
Getting Started
Writing our first test
Jasmine matchers
https://facebook.github.io/jest/docs/en/expect.html#content
Mocking functions
Async tests
Promises
async/await
Mocking Modules
Integration with
enzyme
Snapshots
The Value Of
Snapshots
Jest & Webpack
What should
we test?
Advanced Features
Multi project testing at once (--projects dir1 dir2)
FindRelatedTests (--listTests --findRelatedTests banana.js)
Built in Coverage (--coverage)
Read our blog:
http://blog.500tech.com
Maayan Glikser
maayan@500tech.com