0.1.10 • Published 6 years ago
jest-preset-ngx v0.1.10
jest-preset-ngx
jest preset to run angular specs within jsdom and improved coverage accuracy.
The preset ist about 3 times faster as run with ts-jest
,
because TypeScript
code ist transpiled directly and not run through Babel
.
Additionally the outputted JS is patched for accurate istanbul coverage.
Installation
npm i -D jest-preset-ngx
Usage
Edit your jest configuration like:
{
"preset": "jest-preset-ngx"
}
Resources
- https://github.com/facebook/jest/issues/336#issuecomment-378445560
- https://github.com/thymikee/jest-preset-angular
- https://github.com/kulshekhar/ts-jest
- https://istanbul.js.org/docs/tutorials/typescript/
- https://facebook.github.io/jest/docs/en/configuration.html