unstale

npm / jest-preset-angular

jest-preset-angular

What changed in jest-preset-angular 8 to 17, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.

38 breaking1 security5 new APIs and options1 performance3 behavior and defaults5 tooling9 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.5 on npm

jest-preset-angular 179 changes

Breaking changes 6

  • Support for this package in peerDependencies is dropped; use @angular/platform-browser instead.

    17.0.0release notes

  • The minimum supported Angular version is now v20.

    17.0.0release notes

  • The minimum supported version is now 0.28.0.

    17.0.0release notes

  • Configuring ngJest through Jest's globals option is no longer supported; configure it through transform instead.

    17.0.0release notes

  • The minimum supported NodeJs version is now v20.

    17.0.0release notes

  • Support for the fallback is dropped because Angular v20 provides provideZonelessChangeDetection as a stable API.

    17.0.0release notes

Security 1

  • The transformer avoids prototype pollution in the sha1 cache.

    17.0.1release notes

Fixes and other changes 2

  • Polyfills TextEncoder/TextDecoder for the jsdom environment when loading the bundled Angular compiler CLI.

    17.0.3release notes

  • .mjs files are downlevel-transformed with esbuild to es2016.

    17.0.2release notes

jest-preset-angular 167 changes

Breaking changes 1

  • Drops support for Angular 18, so projects using that Angular version are no longer supported.

    16.0.0upgrade guide

Tooling 2

  • Adds support for Angular 22, allowing developers to use jest-preset-angular with that Angular release.

    16.2.0release notes

  • Adds support for Angular 21, allowing projects using that Angular version to use jest-preset-angular.

    16.0.0upgrade guide

Fixes and other changes 4

  • Use named exports in setup-env declaration files, fixing their type declarations.

    16.1.5release notes

  • Corrected the condition for detecting Angular 21 when patching module resolution.

    16.1.3release notes

  • Adapts the serializer regex for changes in angular/cdk.

    16.1.2release notes

  • Allows using moduleResolution: bundler with Angular 21.

    16.1.2release notes

jest-preset-angular 1516 changes

Breaking changes 12

  • Angular 18 is the minimum supported version.

    15.0.0upgrade guide

  • The defaults preset was removed; use createCjsPreset instead.

    15.0.0upgrade guide

  • The defaults-esm preset was removed; use createEsmPreset instead.

    15.0.0upgrade guide

  • jest-environment-jsdom is now a mandatory dependency that users must install explicitly.

    15.0.0upgrade guide

  • Jest 30 is required.

    15.0.0upgrade guide

  • jsdom is now a mandatory peer dependency that users must install explicitly.

    15.0.0upgrade guide

  • The minimum supported version of jsdom is 22.

    15.0.0upgrade guide

  • This resolver was removed because it is no longer needed for Jest 30.

    15.0.0upgrade guide

  • Supported Node.js versions are ^18.19.1 || ^20.11.1 || >=22.0.0.

    15.0.0upgrade guide

  • setup-jest files were removed; use setupZoneTestEnv or setupZonelessTestEnv for test environment setup.

    15.0.0upgrade guide

  • Generated snapshots no longer include the root id; update component snapshots with the Jest CLI -u option.

    15.0.0upgrade guide

  • TypeScript 5.5 is the minimum supported version.

    15.0.0upgrade guide

New APIs and options 3

  • Use setupZonelessTestEnv as the replacement for zoneless test environment setup.

    15.0.0upgrade guide

  • Use setupZoneTestEnv as the replacement for zone test environment setup.

    15.0.0upgrade guide

  • Preset creator functions now allow customizing testEnvironment.

    15.0.0upgrade guide

Behavior and default changes 1

  • Running ngcc is no longer required for Angular 16+ projects.

    15.0.0upgrade guide

jest-preset-angular 136 changes

Breaking changes 5

  • Support for Angular 11 and 12 is dropped.

    13.0.0upgrade guide

  • The destroyAfterEach option is no longer available; use testEnvironmentOptions instead.

    13.0.0upgrade guide

  • Jest 29 is required to use this release.

    13.0.0upgrade guide

  • The target from tsconfig is respected according to user configuration instead of being hardcoded to ES2015.

    13.0.0upgrade guide

  • The teardown option is no longer available; use testEnvironmentOptions instead.

    13.0.0upgrade guide

Fixes and other changes 1

  • jest-util was added to the package dependencies.

    13.0.0upgrade guide

jest-preset-angular 101 changes

Breaking changes 1

  • Angular 9 is no longer supported; the minimum supported Angular version is 10.

    10.0.0release notes

jest-preset-angular 918 changes

Breaking changes 12

  • Support is dropped for Angular versions earlier than 8.0.

    9.0.0release notes

  • This AST transformer is removed; remove it from the Jest configuration.

    9.0.0release notes

  • Jest 27 is required.

    9.0.0release notes

  • The HTMLCommentSerializer path is changed to this serializer path.

    9.0.0release notes

  • The AngularSnapshotSerializer path is changed to this serializer path.

    9.0.0release notes

  • The AngularNoNgAttributesSnapshotSerializer path is changed to this serializer path.

    9.0.0release notes

  • Imports from jest-preset-angular should use the setup-jest entry point.

    9.0.0release notes

  • The preset no longer provides moduleNameMapper; users relying on its value need to configure their own mapping.

    9.0.0release notes

  • Support is dropped for Node.js 10; the required Node.js version is now >=12.13.0.

    9.0.0release notes

  • If skipLibCheck is not defined in tsconfig, the preset sets it to true; set it explicitly to false to override.

    9.0.0release notes

  • This AST transformer is removed; remove it from the Jest configuration.

    9.0.0release notes

  • The preset now uses its own transformer, wrapping ts-jest; configure Jest to use jest-preset-angular instead of ts-jest.

    9.0.0release notes

New APIs and options 2

  • An ESM preset is added.

    9.0.0release notes

  • The package.json exports field is added to define package entry points.

    9.0.0release notes

Performance 1

  • The compiler reuses Jest's cacheFS to reduce file system reading.

    9.0.0release notes

Tooling 2

Fixes and other changes 1

jest-preset-angular 85 changes

Breaking changes 1

  • Custom Jest configurations must reference serializers, transformers, and setupJest from the build folder; update existing references.

    8.0.0release notes

Behavior and default changes 2

  • The serializer is enabled by default.

    8.0.0release notes

  • The root-folder tsconfig.spec.json is supported by default; move one from src to the root or adjust the Jest configuration.

    8.0.0release notes

Tooling 1

  • core-js is no longer needed as a package.json dependency unless it is imported manually in code.

    8.0.0release notes

Fixes and other changes 1

  • The AST transformer now transforms styles assignments only inside @Component.

    8.0.0release notes