DEV.co
Open-Source Testing · thymikee

jest-preset-angular

jest-preset-angular is an npm package that provides pre-configured Jest settings for Angular projects, eliminating manual setup. It handles TypeScript compilation and Angular-specific test environment configuration out of the box.

Source: GitHub — github.com/thymikee/jest-preset-angular
917
GitHub stars
304
Forks
TypeScript
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorythymikee/jest-preset-angular
Ownerthymikee
Primary languageTypeScript
LicenseMIT — OSI-approved
Stars917
Forks304
Open issues30
Latest releasev17.0.0 (2026-06-16)
Last updated2026-07-06
Sourcehttps://github.com/thymikee/jest-preset-angular

What jest-preset-angular is

A Jest configuration preset built with TypeScript that wraps ts-jest transformers and Angular-compatible settings. It abstracts away transpilation and module resolution complexity for Angular test suites, requiring minimal consumer configuration.

Quickstart

Get the jest-preset-angular source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/thymikee/jest-preset-angular.gitcd jest-preset-angular# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Migrating from Karma/Jasmine to Jest

Accelerates adoption of Jest in existing Angular projects by providing a pre-tuned configuration that handles TypeScript and Angular specifics, reducing setup friction and test execution time.

Monorepo Angular workspaces

Supports yarn workspace and monorepo structures with example projects demonstrating setup. Simplifies consistent Jest configuration across multiple Angular packages.

Angular 13+ projects with ES2016+ targets

Fully aligned with modern Angular (v13 onwards). Handles known limitations (async/await in testing with ES2016+) through preset configuration, reducing developer troubleshooting.

Implementation considerations

  • Requires Node.js and npm/yarn; install jest-preset-angular alongside jest and ts-jest. Reference example projects in the repository for baseline setup.
  • Verify Angular version (13+) and TypeScript target compatibility before adoption. Known limitation: async/await in tests requires ES2016+ target handling.
  • Configure Jest config file (jest.config.js or jest section in package.json) to reference the preset. Consult online documentation for preset property overrides.
  • Run test suite and validate module resolution and coverage reporting. Adjust globals or testEnvironment settings if Angular-specific features (dependency injection, component testing) fail.
  • Pin preset version to a minor release to avoid breaking changes; monitor GitHub releases for guidance on Angular upgrades.

When to avoid it — and what to weigh

  • Require Angular < 13 compatibility — The project explicitly targets Angular 13+. Projects on Angular 12 or earlier require migration guidance or alternative Jest configurations; the preset does not guarantee backward compatibility.
  • Need Jest configuration customization beyond presets — If your testing strategy requires heavy customization of transformers, module resolution, or global test setup, you may outgrow preset abstractions and need direct Jest configuration control.
  • Non-TypeScript or non-standard Angular builds — The preset is tightly coupled to TypeScript and Angular conventions. Projects with custom build tooling, alternate languages, or non-standard structures may find the preset incompatible.
  • Production-critical testing without active vetting — With 30 open issues at snapshot time, ensure the preset version aligns with your Angular version and has been tested in your environment before deploying to production pipelines.

License & commercial use

MIT License. Permissive open-source license allowing use, modification, and distribution in proprietary and commercial projects, provided attribution and license text are retained.

MIT License is a permissive OSI license with no restrictions on commercial use. No license review required for commercial Angular projects. Include original LICENSE.md in distributions if bundling source code.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

No executable code or runtime permissions required; it is a configuration preset. Inherit Jest and TypeScript security posture. Review package.json dependencies (jest, ts-jest, TypeScript versions) for known CVEs before production use. No authentication or credential storage involved.

Alternatives to consider

Angular's default Karma + Jasmine

Official Angular CLI tooling. Requires no additional setup but is slower than Jest and less flexible. Choose if team is deeply invested in Karma ecosystem.

Manual Jest configuration (no preset)

Full control over ts-jest, module resolution, and globals. Use if preset limitations conflict with your build or if existing Jest setup already exists.

Vitest

Modern, fast alternative to Jest with native ES modules support and similar API. Emerging choice for new projects; less mature than Jest for Angular-specific patterns.

Software development agency

Build on jest-preset-angular with DEV.co software developers

Evaluate jest-preset-angular for your Angular project. Review the online documentation, example projects, and migration guides to confirm compatibility with your version and test strategy.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

jest-preset-angular FAQ

Does jest-preset-angular work with Angular 12 or earlier?
No. The project explicitly targets Angular 13+. Projects on Angular 12 or earlier must use alternative Jest configurations or upgrade Angular. Migration guidance is available in the documentation.
What happens if async/await tests fail with higher ES targets?
This is a known Angular limitation (see https://github.com/angular/components/issues/21632). Adjust your TypeScript target in tsconfig.json to ES2016 or lower, or refactor tests to use Promises instead of async/await.
Can I use jest-preset-angular in a monorepo with multiple Angular packages?
Yes. The repository includes example projects demonstrating monorepo and yarn workspace setup. Reference the examples folder for baseline configuration.
Is this preset compatible with my CI/CD pipeline?
Yes. Jest output is standard and compatible with GitHub Actions, GitLab CI, Jenkins, and other CI runners. Ensure the runner has Node.js, npm/yarn, and TypeScript toolchain available.

Software developers & web developers for hire

DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If jest-preset-angular is part of your open-source testing roadmap, our team can implement, customize, migrate, and maintain it.

Ready to speed up Angular testing?

Evaluate jest-preset-angular for your Angular project. Review the online documentation, example projects, and migration guides to confirm compatibility with your version and test strategy.