Skip to content

Commit

Permalink
chore: centralize jest config for angular, module mapping (#1030)
Browse files Browse the repository at this point in the history
see title.

Signed-off-by: Todd Baert <[email protected]>
  • Loading branch information
toddbaert authored Oct 1, 2024
1 parent b8f9b4e commit c4ccf5f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
21 changes: 20 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,26 @@ export default {
],
},
},
'<rootDir>/packages/angular',
{
displayName: 'angular',
testEnvironment: 'jsdom',
preset: 'jest-preset-angular',
testMatch: ['<rootDir>/packages/angular/projects/angular-sdk/src/**/*.spec.{ts,tsx}'],
setupFilesAfterEnv: ['<rootDir>/packages/angular/setup-jest.ts'],
moduleNameMapper: {
'@openfeature/core': '<rootDir>/packages/shared/src',
'@openfeature/web-sdk': '<rootDir>/packages/web/src',
},
transform: {
'^.+\\.(ts|js|html|svg)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/packages/angular/tsconfig.json',
isolatedModules: true,
},
],
},
}
],

// Use this configuration option to add custom reporters to Jest
Expand Down
21 changes: 0 additions & 21 deletions packages/angular/jest.config.ts

This file was deleted.

0 comments on commit c4ccf5f

Please sign in to comment.