From c6f9ce01a83c6927dfe514b64f49d827813dfcee Mon Sep 17 00:00:00 2001 From: "anh.pham" Date: Sat, 30 Apr 2022 12:34:36 +0200 Subject: [PATCH] feat: exclude `ng-jest-resolver` from default/esm presets BREAKING CHANGE Jest 28 correctly resolves Angular package format files so the `ng-jest-resolver` can be marked as optional --- presets/index.js | 1 - src/config/__snapshots__/jest-preset.spec.ts.snap | 2 -- 2 files changed, 3 deletions(-) diff --git a/presets/index.js b/presets/index.js index 5075e53e9e..2acd0907e9 100644 --- a/presets/index.js +++ b/presets/index.js @@ -7,7 +7,6 @@ const basePreset = { stringifyContentPathRegex: '\\.(html|svg)$', }, }, - resolver: 'jest-preset-angular/build/resolvers/ng-jest-resolver.js', testEnvironment: 'jsdom', moduleFileExtensions: ['ts', 'html', 'js', 'json', 'mjs'], snapshotSerializers, diff --git a/src/config/__snapshots__/jest-preset.spec.ts.snap b/src/config/__snapshots__/jest-preset.spec.ts.snap index bad7d59da4..1a5d0dc8a3 100644 --- a/src/config/__snapshots__/jest-preset.spec.ts.snap +++ b/src/config/__snapshots__/jest-preset.spec.ts.snap @@ -15,7 +15,6 @@ Object { "json", "mjs", ], - "resolver": "jest-preset-angular/build/resolvers/ng-jest-resolver.js", "snapshotSerializers": Array [ "jest-preset-angular/build/serializers/html-comment", "jest-preset-angular/build/serializers/ng-snapshot", @@ -53,7 +52,6 @@ Object { "moduleNameMapper": Object { "tslib": "tslib/tslib.es6.js", }, - "resolver": "jest-preset-angular/build/resolvers/ng-jest-resolver.js", "snapshotSerializers": Array [ "jest-preset-angular/build/serializers/html-comment", "jest-preset-angular/build/serializers/ng-snapshot",