jest-preset-angular
Advanced tools
Changelog
12.0.0 (2022-05-10)
jest
and typescript
to peer deps (#1442) (6a652af), closes #1441setup-jest.mjs
for ESM mode (#1463) (cc6ce3f)esbuild
(#1455) (b58d089), closes #1413 #1437ng-jest-resolver
from default/esm presets (#1440) (56673c4)reflect-metadata
in setup-jest
(#1428) (5a36729)zone-patch
and its fallback (#1427) (bf9ea44)ngcc
with specific tsconfig
path (#1418) (5f535b5), closes #1348ngcc
via skipNgcc
option via globalThis
(#1417) (7950b5c), closes #1396ngcc-jest-processor
entry file (#1414) (2c5fd20)zone.js
is 0.11.x and Angular 10 is EOL, so now we can use zone patch directly from zone.js
.
If one is not using zone.js@0.11.x
, please upgrade.reflect-metadata
is not needed anymore.ng-jest-resolver
is now optional..mjs
and any files from node_modules
excluding tslib
to be processed with esbuild
.
With the new option processWithEsbuild
, now we put default all .mjs
files to be processed by esbuild
. Files like lodash-es
default isn't processed by esbuild
.
If you wish to use esbuild
to process such files, please configure in your Jest config like// jest.config.js
module.exports = {
//...
globals: {
ngJest: {
processWithEsbuild: ['**/node_modules/lodash-es/*.js],
}
}
}
ngcc-jest-processor
entry file is now removed. One should use jest-preset-angular/global-setup
instead.Changelog
12.0.0 (2022-05-10)
jest
and typescript
to peer deps (#1442) (6a652af), closes #1441setup-jest.mjs
for ESM mode (#1463) (cc6ce3f)esbuild
(#1455) (b58d089), closes #1413 #1437ng-jest-resolver
from default/esm presets (#1440) (56673c4)reflect-metadata
in setup-jest
(#1428) (5a36729)zone-patch
and its fallback (#1427) (bf9ea44)ngcc
with specific tsconfig
path (#1418) (5f535b5), closes #1348ngcc
via skipNgcc
option via globalThis
(#1417) (7950b5c), closes #1396ngcc-jest-processor
entry file (#1414) (2c5fd20)zone.js
is 0.11.x and Angular 10 is EOL, so now we can use zone patch directly from zone.js
.
If one is not using zone.js@0.11.x
, please upgrade.reflect-metadata
is not needed anymore.ng-jest-resolver
is now optional..mjs
and any files from node_modules
excluding tslib
to be processed with esbuild
.
With the new option processWithEsbuild
, now we put default all .mjs
files to be processed by esbuild
. Files like lodash-es
default isn't processed by esbuild
.
If you wish to use esbuild
to process such files, please configure in your Jest config like// jest.config.js
module.exports = {
//...
globals: {
ngJest: {
processWithEsbuild: ['**/node_modules/lodash-es/*.js],
}
}
}
ngcc-jest-processor
entry file is now removed. One should use jest-preset-angular/global-setup
instead.