- Support Jest 26 (#374)
- Make
AngularSnapshotSerializer
remove auto-generated angular classes in addition to attributes
- Make
AngularSnapshotSerializer
compatible with Ivy (#366)
- Simplify zone patch test method implementation to cover tests with string literals (#361)
- Zone.js patch handles test with
done
correctly (#357)
- Run
test.each
in Proxyzone (#340). - Update
peerDependencies
forjest
to v25 (#346). - Update
dependencies
forpretty-format
andts-jest
to v25 (#346). - Remove
jest-environment-jsdom-fifteen
from dependencies and preset, closes (#325)
- Update project
devDependencies
. - Update example app dependencies.
- (BREAKING): Refine ast-transformer behavior: only transform
styles
-assignments inside @Component (#261) and TypeScript v2.9createStringLiteral
is polyfilled if an older version is used (#272). - (BREAKING): Restructure project with
src
andbuild
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).
- 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).
- If the
astTransformers
are referenced in a customjest
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 thejest-preset-angular/build/
-folder in a custom config. Existing references have to be aligned. - If your
tsconfig.spec.json
is located insrc
, 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 inpackage.json
, unless it's imported manually in the code.
- Added
AngularNoNgAttributesSnapshotSerializer
. Using this serializer makes snapshots clearer and more human-readable. You have to apply this serializer manually by redefiningsnapshotSerializers
jest
option.
- Fixed a CI cache issue in the example app, which would not always use the current version of the preset in the test runs.
- (BREAKING): Upgrade ts-jest to ^23.10.4 and use ast-transformer instead of processor (#204)
- Upgrade Jest to 24 (#224)
- Use test environment JSDOM v13 by default (drops Node below 8) (#229)
- Embed
jest-zone-patch
into this preset (#214)
- 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)
- If
global
andtransform
are not set in your configuration injest.config.json
,jest.config.js
orpackage.json
, you are done. - If the
global
value of the configuration was overridden, adjust- The option
"__TRANSFORM_HTML__": true
is not required anymore. Instead the"stringifyContentPathRegex": "\\.html$"
should be used inside thets-jest
-configuration. - Change the assignment identifier from
tsConfigFile
totsConfig
. - Add the
astTransformers: [require.resolve('jest-preset-angular/InlineHtmlStripStylesTransformer')]
so Jest can work withtemplateUrl
-assignments in Component decorators.
- The option
- If
transform
was overridden, remove the entry pointing atpreprocessor.js
and add"^.+\\.(ts|js|html)$": "ts-jest"
to thetransform
-object. - If in doubt, check the configuration example in
jest-preset.json
.
- Fix: Support backtick quoted templateUrl. (#182)
- Fix: Restrict version of ts-jest to ~23.1.3 (#196)
- Chore: Add HeroesComponent example with mocked service provider (#110)
- Chore: Adjust troubleshooting to support configuration with Angular 6 (#187)
- Chore: Update dependencies for example app (#179)
- Chore: Upgrade
ts-jest
,@types/jest
in dependencies to be compatible withjest
v23. (#173) - Chore: Upgrade peer dependency
jest
to be compatible withjest
v23. (#173)
- Chore: Upgrade example app to Angular 6 (#150)
- Chore: Upgrade dependencies for the repository (#150)
- Fix: fix
preprocess.js
to not break on spaces before colon (#165)
- Fix: specify angular modules as peerDependencies (#141)
- Fix: update
STYLE_URLS_REGEX
to not break on multiple new lines (#139) - Docs: add more troubleshooting docs (#129)
- Chore: Change
testRegex
totestMatch
(#131) - Fix: Update
ts-jest
to22.4.1
– urgent fix forenableTsDiagnostics
(#130)
- Chore: Upgrade ts-jest and remove
mapCoverage
fromjest-preset
(requiresjest@^22.4.0
as a dependency now) (#127)
- Feature: Simplify installation by adding @types/jest as a package dependency (#116)
- Feature: Move serializers setup to jest config to be possible to override them (#126)
- Chore: Upgrade example app to Angular 5.2 using Angular CLI 1.6 (#116)
- Docs: Add a configuration section with vendor libraries like jQuery (#117)
- Breaking: Upgrade Jest to 22 (#109)
- Breaking: Upgrade
ts-jest
to 22 (#109) - Chore: Get rid of explicit
jsdom
dependency and custom test environment
- Breaking: Change to MIT license (#102)
- Fix: Upgrade example app to Angular 5.0.0 using Angular CLI 1.6.1 (#101)
- Fix: Make example app compile (#101)
- Chore: Update dependencies (#101)
- Fix: Add doctype to test envrionment (#78)
- Breaking: Drop Node 4 support (because of
jsdom
upgrade) - Feature: Custom test environment with newest version of
jsdom
(#75) - Feature: Use universal
zone.js
instead of node-specific one (#76) - Fix:
fakeAsync
not working withzone.js
>= 0.8.11
- Breaking: Upgrade Jest to 21
- Breaking: Upgrade
ts-jest
to 21 - Breaking:
moduleNameMapper
no longer maps absolute paths tosrc
by default, you need to declare the mappings explicitly (#53) - Fix: issues with
moduleNameMapper
not overriding mappings (#53)
- Fix: Bump to ts-jest 20.0.7
- Fix: Angular injection errors are now visible
- Fix: Escape template literals special chars (#34)
- Breaking: Upgrade to Jest 20
- Breaking: Better snapshot rendering
- Feature: Support absolute URLs in
templateUrl
- Feature: Support snapshot testing (#24)
- Breaking change:
rxjs
is no longer auto included (#18)
- Fix: Bump
jest-zone-patch
version withzone.js
peer dependency
- Fix: Overhaul regex for styleUrls (#10)
- Fix: Improve global mocks
- Feature: Allow all folders within src for module resolution (#6)
- Fix: use
tsconfig.spec.json
instead oftsconfig.app.json
as TS configuration for tests