diff --git a/angular/envs/angular-v16-env/jest/jest.config.ts b/angular/envs/angular-v16-env/jest/jest.config.ts index 6ad62fc..cda16a0 100644 --- a/angular/envs/angular-v16-env/jest/jest.config.ts +++ b/angular/envs/angular-v16-env/jest/jest.config.ts @@ -1,4 +1,5 @@ import { generateNodeModulesPattern } from '@teambit/dependencies.modules.packages-excluder'; + const { defaultTransformerOptions } = require('jest-preset-angular/presets'); const packagesToExclude: string[] = ['@angular', '@ngrx', 'apollo-angular']; diff --git a/angular/examples/my-angular-env/config/jest.config.ts b/angular/examples/my-angular-env/config/jest.config.ts index 6b77d93..fe140e4 100644 --- a/angular/examples/my-angular-env/config/jest.config.ts +++ b/angular/examples/my-angular-env/config/jest.config.ts @@ -3,6 +3,7 @@ */ import { jestConfig } from '@bitdev/angular.angular-env'; import { generateNodeModulesPattern } from '@teambit/dependencies.modules.packages-excluder'; + const { defaultTransformerOptions } = require('jest-preset-angular/presets'); const packagesToExclude: string[] = ['@angular', '@ngrx', 'apollo-angular']; diff --git a/angular/templates/generators/ng-env/files/config/jest.config.ts b/angular/templates/generators/ng-env/files/config/jest.config.ts index 70d75a8..2201fac 100644 --- a/angular/templates/generators/ng-env/files/config/jest.config.ts +++ b/angular/templates/generators/ng-env/files/config/jest.config.ts @@ -6,6 +6,7 @@ export const jestConfigFile = (angularVersion: number, envPkgName: string) => { */ import { jestConfig } from '${envPkgName}'; import { generateNodeModulesPattern } from '@teambit/dependencies.modules.packages-excluder'; + ${angularVersion >= 16 ? ` const { defaultTransformerOptions } = require('jest-preset-angular/presets'); ` : ''}