Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thymikee/jest-preset-angular
Jest configuration preset for Angular projects.
https://github.com/thymikee/jest-preset-angular
angular jest testing
Last synced: about 19 hours ago
JSON representation
Jest configuration preset for Angular projects.
- Host: GitHub
- URL: https://github.com/thymikee/jest-preset-angular
- Owner: thymikee
- License: mit
- Created: 2017-03-30T20:35:39.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T17:32:20.000Z (about 1 month ago)
- Last Synced: 2024-10-29T18:55:50.573Z (about 1 month ago)
- Topics: angular, jest, testing
- Language: TypeScript
- Homepage: https://thymikee.github.io/jest-preset-angular/
- Size: 139 MB
- Stars: 885
- Watchers: 18
- Forks: 306
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
- Support: .github/SUPPORT.md
Awesome Lists containing this project
- awesome-jest - jest-preset-angular
- awesome-angular - jest-preset-angular - Jest configuration preset for Angular projects. (Table of contents / Angular)
- fucking-awesome-angular - jest-preset-angular - Jest configuration preset for Angular projects. (Table of contents / Angular)
- fucking-awesome-angular - jest-preset-angular - Jest configuration preset for Angular projects. (Table of contents / Angular)
README
Jest Preset Angular
A preset of Jest configuration for Angular projects.
> 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](https://www.xfive.co/blog/testing-angular-faster-jest/).
## Installation
Install using [`yarn`](https://yarnpkg.com/en/package/jest-preset-angular):
```bash
yarn add -D jest jest-preset-angular @types/jest
```Or [`npm`](https://www.npmjs.com/package/jest-preset-angular):
```bash
npm install -D jest jest-preset-angular @types/jest
```## Configuration
Check out our [Configuration guidance](https://thymikee.github.io/jest-preset-angular/docs/getting-started/installation).
**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](https://thymikee.github.io/jest-preset-angular/docs/guides/angular-13+)
## Angular Ivy
Check out our [Angular Ivy guidance](https://thymikee.github.io/jest-preset-angular/docs/guides/angular-ivy)
## Example projects with base Jest configuration
We have [example apps](https://github.com/thymikee/jest-preset-angular/tree/main/examples) 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](https://www.typescriptlang.org/) - JavaScript that scales
- [Angular](https://angular.dev/) - Deliver web apps with confidence 🚀
- [`ts-jest`](https://kulshekhar.github.io/ts-jest) - Jest transformer for TypeScript## Authors/maintainers
- **Michał Pierzchała** - [thymikee](https://github.com/thymikee)
- **Ahn** - [ahnpnl](https://github.com/ahnpnl)
- **Thomas** - [wtho](https://github.com/wtho)See also the list of [contributors](https://github.com/thymikee/jest-preset-angular/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details