Skip to content

Commit cd504fb

Browse files
committed
feat(@angular-ru/jest-utils): set isolatedModules as false for TS 4.2
1 parent 450fc11 commit cd504fb

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

packages/jest-utils/integration/tests/simple.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('[TEST]: Hello world', () => {
2424
).toEqual({
2525
globals: {
2626
'ts-jest': {
27-
isolatedModules: true,
27+
isolatedModules: false,
2828
tsconfig: '../tsconfig.json',
2929
stringifyContentPathRegex: '\\.html$',
3030
astTransformers: {

packages/jest-utils/src/create-ts-jest-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function createTsJestConfig(options: JestConfigOptions & Config.InitialOp
6767
*/
6868
globals: {
6969
'ts-jest': {
70-
isolatedModules: true,
70+
isolatedModules: options.isolatedModules ?? false,
7171
tsconfig: options?.tsConfigSpecPath ?? options.tsConfigRootPath,
7272
stringifyContentPathRegex: '\\.html$',
7373
astTransformers: {

packages/jest-utils/src/jest-config.interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface JestConfigOptions {
1212
coverageReporters?: string[];
1313
moduleNameMapper?: Record<string, string | string[]>;
1414
/* custom: */
15+
isolatedModules?: boolean;
1516
tsConfigRootPath?: string;
1617
tsConfigSpecPath?: string;
1718
debug?: boolean;

0 commit comments

Comments
 (0)