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.Changelog
11.0.0 (2021-11-18)
ts-jest
types for preset types (#1172) (81854f6)mjs
to the list of moduleFileExtensions
(#1155) (3c992a1), closes #1147js
files in node_modules
with esbuild
(#1169) (1de3bf0)esbuild
to process .mjs
files (#1142) (5d3fe10), closes #1141js
files from node_modules
are now compiled with esbuild
to improve performance.^12.20.0 || ^14.15.0 || >=16.10.0
.mjs
files from Angular ESM packages. Please check our migration documentation at https://thymikee.github.io/jest-preset-angular/docs/next/guides/angular-13+Alan Agius, Pete Bacon Darwin from Angular team