npm
npmjs.com › package › jest-preset-angular
jest-preset-angular - npm
1 month ago - Latest version: 16.1.4, last published: 24 days ago. Start using jest-preset-angular in your project by running `npm i jest-preset-angular`. There are 58 other projects in the npm registry using jest-preset-angular.
» npm install jest-preset-angular
Published Apr 09, 2026
Version 16.1.4
GitHub
github.com › thymikee › jest-preset-angular › blob › main › CHANGELOG.md
jest-preset-angular/CHANGELOG.md at main · thymikee/jest-preset-angular
March 21, 2023 - Update jsdom to current version 15 (#318). If the astTransformers are referenced in a custom jest config, [ 'jest-preset-angular/build/InlineFilesTransformer', 'jest-preset-angular/build/StripStylesTransformer'] have to be set instead.
Author thymikee
Videos
02:27:04
[Apprendre Angular] 14- Tests unitaires et d'intégration avec ...
26:38
Angular x Jest - Tout comprendre sur le testing des composants ...
Angular x Jest - Apprendre à tester ses SERVICES
10:55
how to upgrade angular application | upgrading angular lower version ...
03:01
More Angular updates in Angular v15 - YouTube
Angular 14 new features | Angular 15 Updates: The Big ...
npm
npmjs.com › package › @angular-builders › jest
angular-builders/jest
January 14, 2026 - Latest version: 21.0.3, last published: 4 months ago. Start using @angular-builders/jest in your project by running `npm i @angular-builders/jest`. There are 2 other projects in the npm registry using @angular-builders/jest.
» npm install @angular-builders/jest
Published Jan 14, 2026
Version 21.0.3
GitHub
github.com › stephanrauh › angular-jest
GitHub - stephanrauh/angular-jest: Testing Angular with Jest · GitHub
Before Angular 16, there was no official support for Jest, but several great community solutions. The folder Angular 15 and below shows how to use Jest with an older Angular version.
Starred by 27 users
Forked by 9 users
Languages HTML 60.5% | TypeScript 35.8% | JavaScript 3.1%
Stack Overflow
stackoverflow.com › questions › 75025943 › angular-15-with-jest-preset-angular-reports-component-is-not-resolved-di
jestjs - Angular 15 with Jest Preset Angular reports: Component ... is not resolved... Did you run and wait for 'resolveComponentResources()'? - Stack Overflow
"tslib": "^2.0.0", "typescript": "4.8.3", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-builders/dev-server": "^7.3.1", "@angular-devkit/architect": "0.1500.4", "@angular-eslint/schematics": "^15.1.0", "@types/clone": "^2.1.1", "@types/file-saver": "^2.0.5", "@types/jest": "^29.2.5", "@types/node": "^12.20.7", "@types/string-similarity": "^4.0.0", ... "jest-preset-angular": "^12.2.3", "jsonc-parser": "^3.0.0", "open": "^7.0.3", "rxjs-watcher": "^1.1.3", "ts-node": "~8.3.0", "tslint": "~6.1.0" } } ... { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "new
GitHub
github.com › thymikee › jest-preset-angular › issues › 1838
Angular 15 Support · Issue #1838 · thymikee/jest-preset-angular
November 17, 2022 - Just creating this for tracking. Per: The leftover work now includes: Adopt changes from ts-jest 29 Migrate any config under globals to be transformer config, just like ts-jest Test with angular 15 Originally posted by @ahnpnl in #1774 (...
Author michaelfaith
Thymikee
thymikee.github.io › installation
Installation | jest-preset-angular
1 month ago - You can install jest-preset-angular and dependencies all at once with one of the following commands. ... Angular doesn't support native async/await in testing with target higher than ES2016, see https://github.com/angular/components/issues/21632#issuecomment-764975917 ... For ESM configuration, ...
GitHub
github.com › thymikee › jest-preset-angular
GitHub - thymikee/jest-preset-angular: Jest configuration preset for Angular projects. · GitHub
The examples folder consist of several example Angular applications from v13 onwards as well as example projects with yarn workspace or monorepo structure. ... See also the list of contributors who participated in this project.
Starred by 916 users
Forked by 304 users
Languages TypeScript 89.7% | JavaScript 7.1% | CSS 2.8%
Top answer 1 of 5
3
So I was searching online for quite sometime then I came across this solution, hope it works for you as well.
In the jest.config.js file, if you are using the moduleDirectories config change it from moduleDirectories: ['node_modules', './'] to moduleDirectories: ['node_modules', __dirname]
2 of 5
2
There are couple of things you can do
1- Make sure you changed this in setup-jest.ts file
import 'jest-preset-angular/setup-jest'; //from
import 'jest-preset-angular/setup-jest.mjs'; //to
2- add mjs to module file extensions
moduleFileExtensions: ['ts', 'html', 'js', 'json', 'mjs'],
3- Map your ts config paths at the moduleNameMapper, you can add rootDir/ as prefix as a second parameter to pathsToModuleNameMapper if needed
const { compilerOptions } = require('$tsconfigFilePath'); // replace $tsconfigFilePath with the actual tsconfigFilePath;
const { pathsToModuleNameMapper } = require('ts-jest');
module.exports = {
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths),
tslib: 'tslib/tslib.es6.js',
}
}
4- This one is tricky if you are using ngrx replace the following, this might be fixed in future version, it really depends on which @nrwl/jest version you are using, mine as of now is 14.6.0
const nxPreset = require('@nrwl/jest/preset'); //from
const nxPreset = require('@nrwl/jest/preset').default; //to
Shajith's Blog
hashnode.shajith.co.in › jest-with-angular-15
Jest with Angular 15 - Shajith's blog
January 21, 2023 - "jest": { "preset": "jest-preset-angular", "setupFilesAfterEnv": ["<rootDir>/setup-jest.ts"], "globalSetup": "jest-preset-angular/global-setup" } I have added it after the devDependencies. ... Open tsconfig.spec.json and change jasmine to jest. “Jasmine” is replaced with the text “jest” ... Now Open package.json, In the scripts check for test.
UNPKG
unpkg.com › browse › jest-preset-angular@5.0.0-beta.0 › CHANGELOG.md
jest-preset-angular/CHANGELOG.md
## Changelog (master) ### v4.0.2 ...ular/pull/15)) * Adjustment: Add `json` as a valid module extension ([#16](https://github.com/thymikee/jest-preset-angular/pull/16)) ### v0.0.14 * Fix: Bump `jest-zone-patch` version with `zone.js` peer dependency ### v0.0.13 * Fix: Overhaul regex for styleUrls ...