Skip to content

Commit c4ccf5f

Browse files
authored
chore: centralize jest config for angular, module mapping (#1030)
see title. Signed-off-by: Todd Baert <[email protected]>
1 parent b8f9b4e commit c4ccf5f

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

jest.config.ts

+20-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,26 @@ export default {
189189
],
190190
},
191191
},
192-
'<rootDir>/packages/angular',
192+
{
193+
displayName: 'angular',
194+
testEnvironment: 'jsdom',
195+
preset: 'jest-preset-angular',
196+
testMatch: ['<rootDir>/packages/angular/projects/angular-sdk/src/**/*.spec.{ts,tsx}'],
197+
setupFilesAfterEnv: ['<rootDir>/packages/angular/setup-jest.ts'],
198+
moduleNameMapper: {
199+
'@openfeature/core': '<rootDir>/packages/shared/src',
200+
'@openfeature/web-sdk': '<rootDir>/packages/web/src',
201+
},
202+
transform: {
203+
'^.+\\.(ts|js|html|svg)$': [
204+
'jest-preset-angular',
205+
{
206+
tsconfig: '<rootDir>/packages/angular/tsconfig.json',
207+
isolatedModules: true,
208+
},
209+
],
210+
},
211+
}
193212
],
194213

195214
// Use this configuration option to add custom reporters to Jest

packages/angular/jest.config.ts

-21
This file was deleted.

0 commit comments

Comments
 (0)