jest-preset-angular

Jest configuration preset for Angular projects.

MIT License

Downloads
3.6M
Stars
867
Committers
73

Bot releases are visible (Hide)

jest-preset-angular - v8.4.0

Published by github-actions[bot] over 3 years ago

jest-preset-angular - v9.0.0-next.9

Published by github-actions[bot] over 3 years ago

jest-preset-angular - v9.0.0-next.8

Published by github-actions[bot] over 3 years ago

jest-preset-angular - v9.0.0-next.7

Published by github-actions[bot] over 3 years ago

jest-preset-angular - v9.0.0-next.6

Published by github-actions[bot] almost 4 years ago

jest-preset-angular - v9.0.0-next.5

Published by github-actions[bot] almost 4 years ago

jest-preset-angular - v9.0.0-next.4

Published by github-actions[bot] almost 4 years ago

jest-preset-angular - v9.0.0-next.3

Published by github-actions[bot] almost 4 years ago

jest-preset-angular - v9.0.0-next.2

Published by github-actions[bot] almost 4 years ago

jest-preset-angular - v9.0.0-next.1

Published by ahnpnl almost 4 years ago

Cut release v9.0.0-next.1

jest-preset-angular - v8.3.2

Published by ahnpnl about 4 years ago

jest-preset-angular - v9.0.0-next.0

Published by ahnpnl about 4 years ago

jest-preset-angular - v8.3.1

Published by ahnpnl about 4 years ago

jest-preset-angular - v8.3.0

Published by ahnpnl about 4 years ago

jest-preset-angular - v8.2.1

Published by ahnpnl over 4 years ago

jest-preset-angular - v8.0.0

Published by wtho about 5 years ago

Features

  • (BREAKING): Refine ast-transformer behavior: only transform styles-assignments inside @Component (#261) and TypeScript v2.9 createStringLiteral is polyfilled if an older version is used (#272).
  • (BREAKING): Restructure project with src and build folder (#307).
  • (BREAKING): Support tsconfig.spec.json in root folder by default (#309).
  • (BREAKING): Enable AngularNoAngularNoNgAttributesSnapshotSerializer (created in #97) by default (#318).
  • Remove core-js dependency by using internal, minimal reflect-metadata (#315).

Chore && Maintenance

  • Update example app to match Angular 8 Boilerplate (#311).
  • Update example app to not use karma, extract jest config, fix paths (#316).
  • Update jsdom to current version 15 (#318).

Migration Guide

  • 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.
  • Serializers, transformers and setupJest have to be referenced from the jest-preset-angular/build/-folder in a custom config. Existing references have to be aligned.
  • If your tsconfig.spec.json is located in src, move it to your root folder and adjust the referenced files and paths inside, or align your jest configuration as discussed in the README.md.
  • In an Angular 8 project or higher, core-js should no longer be a dependency declared in package.json, unless it's imported manually in the code.
jest-preset-angular -

Published by thymikee over 5 years ago

Chore

  • Update dependencies to enable Greenkeeper 🌴 (#235)
jest-preset-angular -

Published by thymikee over 5 years ago

Features

  • (BREAKING): Upgrade ts-jest to ^23.10.4 and use ast-transformer instead of processor (#204)
  • (BREAKING): Upgrade Jest to 24 (#224)
  • (BREAKING): Use test environment JSDOM v13 by default (drops Node below 8) (#229)
  • Embed jest-zone-patch into this preset (#214)

Chore & Maintenance

  • Remove template literal character escaping (reverts #34)
  • Moved @types/jest to devDependencies (#227), close (#226)
  • Upgrade example app dependencies (#233)
  • Migrate CI config to CircleCI v2 (#212)
  • Docs: do not use .babelrc file but rather babel.config.js (#231)
  • Docs: add astTransformers in configuration example (#218)

Migration Guide

  • If global and transform are not set in your configuration in jest.config.json, jest.config.js or package.json, you are done.
  • If the global value of the configuration was overriden, adjust
    • The option "__TRANSFORM_HTML__": true is not required anymore. Instead the "stringifyContentPathRegex": "\\.html$" should be used inside the ts-jest-configuration.
    • Change the assignment identifier from tsConfigFile to tsConfig.
    • Add the astTransformer: [ require.resolve('jest-preset-angular/InlineHtmlStripStylesTransformer')] so Jest can work with templateUrl-assignments in Component decorators.
  • If transform was overridden, remove the entry pointing at preprocessor.js and add "^.+\\.(ts|js|html)$": "ts-jest" to the transform-object.
  • If in doubt, check the configuration example in jest-preset.json.
jest-preset-angular -

Published by thymikee almost 6 years ago

Fixes

  • adjust semver range of jest-zone-patch to support test.each (#209)
jest-preset-angular -

Published by thymikee about 6 years ago

Jest 22 support