jest-preset-angular
TypeScript icon, indicating that this package has built-in type declarations

14.5.0 • Public • Published

Jest Preset Angular

A preset of Jest configuration for Angular projects.

Build Status NPM Version GitHub license

Our online documentation is available at https://thymikee.github.io/jest-preset-angular/

This is a part of the article: Testing Angular faster with Jest.

Installation

Install using yarn:

yarn add -D jest jest-preset-angular @types/jest

Or npm:

npm install -D jest jest-preset-angular @types/jest

Configuration

Check out our Configuration guidance.

IMPORTANT

Angular doesn't support native async/await in testing with target higher than ES2016, see https://github.com/angular/components/issues/21632#issuecomment-764975917

Migration from Angular < 13

Check out our Migration from Angular < 13 guidance

Angular Ivy

Check out our Angular Ivy guidance

Example projects with base Jest configuration

We have example apps to provide a basic setup to use Jest in an Angular project. The examples folder consist of several example Angular applications from v13 onwards as well as example projects with yarn workspace or monorepo structure.

Built With

  • TypeScript - JavaScript that scales
  • Angular - Deliver web apps with confidence 🚀
  • ts-jest - Jest transformer for TypeScript

Authors/maintainers

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Dependencies (6)

Dev Dependencies (50)

Package Sidebar

Install

npm i jest-preset-angular

Weekly Downloads

912,087

Version

14.5.0

License

MIT

Unpacked Size

751 kB

Total Files

65

Last publish

Collaborators

  • thymikee
  • wtho
  • anhpnnd