From 3cc9b806be2b2096b981253d39ca40df65bb0f7b Mon Sep 17 00:00:00 2001 From: Ahn Date: Tue, 10 Nov 2020 18:50:13 +0100 Subject: [PATCH] refactor(config): remove support for `tsConfig` option (#2127) BREAKING CHANGE: One currently uses `tsConfig` should change to `tsconfig` in your `jest.config.js` or `package.json` --- docs/user/config/index.md | 4 +- docs/user/config/{tsConfig.md => tsconfig.md} | 6 +- .../__snapshots__/logger.test.ts.snap | 57 --- e2e/__tests__/logger.test.ts | 16 - src/__helpers__/fakers.ts | 15 +- src/cli/cli.spec.ts | 384 +++++++++--------- src/config/config-set.spec.ts | 4 +- src/config/config-set.ts | 5 +- src/transformers/path-mapping.spec.ts | 4 +- src/types.ts | 15 +- .../__snapshots__/backports.spec.ts.snap | 8 +- src/utils/backports.ts | 8 +- src/utils/messages.ts | 2 - 13 files changed, 212 insertions(+), 316 deletions(-) rename docs/user/config/{tsConfig.md => tsconfig.md} (96%) diff --git a/docs/user/config/index.md b/docs/user/config/index.md index cef081d4c7..f1e2bd9586 100644 --- a/docs/user/config/index.md +++ b/docs/user/config/index.md @@ -207,7 +207,7 @@ All options have default values which should fit most of the projects. Click on | Option | Description | Type | Default | |---|---|---|---| | [**`compiler`**][compiler] | [TypeScript module to use as compiler.][compiler] | `string` | `"typescript"` | -| [**`tsConfig` or `tsconfig`**][tsConfig] | [TypeScript compiler related configuration.][tsConfig] | `string`\|`object`\|`boolean` | _auto_ | +| [**`tsconfig`**][tsconfig] | [TypeScript compiler related configuration.][tsconfig] | `string`\|`object`\|`boolean` | _auto_ | | [**`isolatedModules`**][isolatedModules] | [Disable type-checking][isolatedModules] | `boolean` | _disabled_ | | [**`astTransformers`**][astTransformers] | [Custom TypeScript AST transformers][astTransformers] | `object` | _auto_ | | [**`diagnostics`**][diagnostics] | [Diagnostics related configuration.][diagnostics] | `boolean`\|`object` | _enabled_ | @@ -260,7 +260,7 @@ npx ts-jest config:migrate package.json [compiler]: compiler -[tsConfig]: tsConfig +[tsconfig]: tsconfig [isolatedModules]: isolatedModules [astTransformers]: astTransformers [compilerHost]: compilerHost diff --git a/docs/user/config/tsConfig.md b/docs/user/config/tsconfig.md similarity index 96% rename from docs/user/config/tsConfig.md rename to docs/user/config/tsconfig.md index 218ebc4cf5..3bd1a90b84 100644 --- a/docs/user/config/tsConfig.md +++ b/docs/user/config/tsconfig.md @@ -37,7 +37,7 @@ module.exports = { "jest": { "globals": { "ts-jest": { - "tsConfig": "tsconfig.test.json" + "tsconfig": "tsconfig.test.json" } } } @@ -76,7 +76,7 @@ module.exports = { "jest": { "globals": { "ts-jest": { - "tsConfig": { + "tsconfig": { "importHelpers": true } } @@ -114,7 +114,7 @@ module.exports = { "jest": { "globals": { "ts-jest": { - "tsConfig": false + "tsconfig": false } } } diff --git a/e2e/__tests__/__snapshots__/logger.test.ts.snap b/e2e/__tests__/__snapshots__/logger.test.ts.snap index ada5ac4926..c1d261c16d 100644 --- a/e2e/__tests__/__snapshots__/logger.test.ts.snap +++ b/e2e/__tests__/__snapshots__/logger.test.ts.snap @@ -244,63 +244,6 @@ exports[`ts-jest logging deprecation warning with packageJson config should pass ================================================================================ `; -exports[`ts-jest logging deprecation warning with tsConfig config should pass using template "default" 1`] = ` - √ jest - ↳ exit code: 0 - ===[ STDOUT ]=================================================================== - - ===[ STDERR ]=================================================================== - ts-jest[config] (WARN) The option \`tsConfig\` is deprecated and will be removed in ts-jest 27, use \`tsconfig\` instead - PASS ./Hello.spec.ts - Hello Class - √ should create a new Hello - - Test Suites: 1 passed, 1 total - Tests: 1 passed, 1 total - Snapshots: 0 total - Time: XXs - Ran all test suites. - ================================================================================ -`; - -exports[`ts-jest logging deprecation warning with tsConfig config should pass using template "with-babel-7" 1`] = ` - √ jest - ↳ exit code: 0 - ===[ STDOUT ]=================================================================== - - ===[ STDERR ]=================================================================== - ts-jest[config] (WARN) The option \`tsConfig\` is deprecated and will be removed in ts-jest 27, use \`tsconfig\` instead - PASS ./Hello.spec.ts - Hello Class - √ should create a new Hello - - Test Suites: 1 passed, 1 total - Tests: 1 passed, 1 total - Snapshots: 0 total - Time: XXs - Ran all test suites. - ================================================================================ -`; - -exports[`ts-jest logging deprecation warning with tsConfig config should pass using template "with-babel-7-string-config" 1`] = ` - √ jest - ↳ exit code: 0 - ===[ STDOUT ]=================================================================== - - ===[ STDERR ]=================================================================== - ts-jest[config] (WARN) The option \`tsConfig\` is deprecated and will be removed in ts-jest 27, use \`tsconfig\` instead - PASS ./Hello.spec.ts - Hello Class - √ should create a new Hello - - Test Suites: 1 passed, 1 total - Tests: 1 passed, 1 total - Snapshots: 0 total - Time: XXs - Ran all test suites. - ================================================================================ -`; - exports[`ts-jest logging with unsupported version test with TS_JEST_DISABLE_VER_CHECKER is not set in process.env should pass using template "with-unsupported-version" 1`] = ` √ jest ↳ exit code: 0 diff --git a/e2e/__tests__/logger.test.ts b/e2e/__tests__/logger.test.ts index 8c191f7b7a..aa3219f7db 100644 --- a/e2e/__tests__/logger.test.ts +++ b/e2e/__tests__/logger.test.ts @@ -123,21 +123,5 @@ describe('ts-jest logging', () => { }) }) }) - - describe('with tsConfig config', () => { - const testCase = configureTestCase('simple', { - tsJestConfig: { - tsConfig: true, - } - }) - - testCase.runWithTemplates(allPackageSetsWithPreset, 0, (runTest, { testLabel }) => { - it(testLabel, () => { - const result = runTest() - expect(result.status).toBe(0) - expect(result).toMatchSnapshot() - }) - }) - }) }) }) diff --git a/src/__helpers__/fakers.ts b/src/__helpers__/fakers.ts index ae6796cdcf..0c0e43c996 100644 --- a/src/__helpers__/fakers.ts +++ b/src/__helpers__/fakers.ts @@ -4,7 +4,7 @@ import { resolve } from 'path' import { createCompilerInstance } from '../compiler/instance' import { ConfigSet } from '../config/config-set' -import type { BabelConfig, TsCompiler, TsJestConfig, TsJestGlobalOptions } from '../types' +import type { BabelConfig, TsCompiler, TsJestGlobalOptions } from '../types' import type { ImportReasons } from '../utils/messages' export function filePath(relPath: string): string { @@ -13,19 +13,6 @@ export function filePath(relPath: string): string { export const rootDir = filePath('') -export function tsJestConfig(options?: Partial): TsJestConfig { - return { - isolatedModules: false, - compiler: 'typescript', - transformers: options?.transformers ?? Object.create(null), - babelConfig: undefined, - tsConfig: undefined, - stringifyContentPathRegex: undefined, - diagnostics: { ignoreCodes: [], pretty: false, throws: true }, - ...options, - } -} - function getJestConfig( options?: Partial, tsJestOptions?: TsJestGlobalOptions, diff --git a/src/cli/cli.spec.ts b/src/cli/cli.spec.ts index 08ddd2ef05..87173263d0 100644 --- a/src/cli/cli.spec.ts +++ b/src/cli/cli.spec.ts @@ -66,43 +66,43 @@ describe('cli', () => { it('should output usage', async () => { expect.assertions(2) await expect(runCli()).resolves.toMatchInlineSnapshot(` -Object { - "exitCode": 0, - "log": "", - "stderr": "", - "stdout": " -Usage: - ts-jest command [options] [...args] - -Commands: - config:init Creates initial Jest configuration - config:migrate Migrates a given Jest configuration - help [command] Show this help, or help about a command - -Example: - ts-jest help config:migrate -", -} -`) + Object { + "exitCode": 0, + "log": "", + "stderr": "", + "stdout": " + Usage: + ts-jest command [options] [...args] + + Commands: + config:init Creates initial Jest configuration + config:migrate Migrates a given Jest configuration + help [command] Show this help, or help about a command + + Example: + ts-jest help config:migrate + ", + } + `) await expect(runCli('hello:motto')).resolves.toMatchInlineSnapshot(` -Object { - "exitCode": 0, - "log": "", - "stderr": "", - "stdout": " -Usage: - ts-jest command [options] [...args] - -Commands: - config:init Creates initial Jest configuration - config:migrate Migrates a given Jest configuration - help [command] Show this help, or help about a command - -Example: - ts-jest help config:migrate -", -} -`) + Object { + "exitCode": 0, + "log": "", + "stderr": "", + "stdout": " + Usage: + ts-jest command [options] [...args] + + Commands: + config:init Creates initial Jest configuration + config:migrate Migrates a given Jest configuration + help [command] Show this help, or help about a command + + Example: + ts-jest help config:migrate + ", + } + `) }) }) @@ -229,31 +229,31 @@ Jest configuration written to "${normalize('/foo/bar/package.json')}". it('should output help', async () => { const res = await runCli('help', noOption[0]) expect(res).toMatchInlineSnapshot(` -Object { - "exitCode": 0, - "log": "", - "stderr": "", - "stdout": " -Usage: - ts-jest config:init [options] [] - -Arguments: - Can be a js or json Jest config file. If it is a - package.json file, the configuration will be read from - the \\"jest\\" property. - Default: jest.config.js - -Options: - --force Discard any existing Jest config - --js ts|babel Process .js files with ts-jest if 'ts' or with - babel-jest if 'babel' - --no-jest-preset Disable the use of Jest presets - --tsconfig Path to the tsconfig.json file - --babel Pipe babel-jest after ts-jest - --jsdom Use jsdom as test environment instead of node -", -} -`) + Object { + "exitCode": 0, + "log": "", + "stderr": "", + "stdout": " + Usage: + ts-jest config:init [options] [] + + Arguments: + Can be a js or json Jest config file. If it is a + package.json file, the configuration will be read from + the \\"jest\\" property. + Default: jest.config.js + + Options: + --force Discard any existing Jest config + --js ts|babel Process .js files with ts-jest if 'ts' or with + babel-jest if 'babel' + --no-jest-preset Disable the use of Jest presets + --tsconfig Path to the tsconfig.json file + --babel Pipe babel-jest after ts-jest + --jsdom Use jsdom as test environment instead of node + ", + } + `) }) }) // init @@ -306,30 +306,30 @@ Options: ) const res = await runCli(...noOption, pkgPaths.current) expect(res).toMatchInlineSnapshot(` -Object { - "exitCode": 0, - "log": "", - "stderr": " -Migrated Jest configuration: - - -Detected preset 'default' as the best matching preset for your configuration. -Visit https://kulshekhar.github.io/ts-jest/user/config/#jest-preset for more information about presets. - -", - "stdout": "\\"jest\\": { - \\"globals\\": { - \\"ts-jest\\": { - \\"tsConfig\\": { - \\"target\\": \\"es6\\" - } - } - }, - \\"preset\\": \\"ts-jest\\" -} -", -} -`) + Object { + "exitCode": 0, + "log": "", + "stderr": " + Migrated Jest configuration: + + + Detected preset 'default' as the best matching preset for your configuration. + Visit https://kulshekhar.github.io/ts-jest/user/config/#jest-preset for more information about presets. + + ", + "stdout": "\\"jest\\": { + \\"globals\\": { + \\"ts-jest\\": { + \\"tsconfig\\": { + \\"target\\": \\"es6\\" + } + } + }, + \\"preset\\": \\"ts-jest\\" + } + ", + } + `) expect(fs.writeFileSync).not.toHaveBeenCalled() }) @@ -345,24 +345,24 @@ Visit https://kulshekhar.github.io/ts-jest/user/config/#jest-preset for more inf ) const res = await runCli(...fullOptions, pkgPaths.current) expect(res).toMatchInlineSnapshot(` -Object { - "exitCode": 0, - "log": "", - "stderr": " -Migrated Jest configuration: -", - "stdout": "\\"jest\\": { - \\"globals\\": { - \\"ts-jest\\": { - \\"tsConfig\\": { - \\"target\\": \\"es6\\" - } - } - } -} -", -} -`) + Object { + "exitCode": 0, + "log": "", + "stderr": " + Migrated Jest configuration: + ", + "stdout": "\\"jest\\": { + \\"globals\\": { + \\"ts-jest\\": { + \\"tsconfig\\": { + \\"target\\": \\"es6\\" + } + } + } + } + ", + } + `) expect(fs.writeFileSync).not.toHaveBeenCalled() }) @@ -387,29 +387,29 @@ Migrated Jest configuration: ) const res = await runCli(...noOption, pkgPaths.current) expect(res.stdout).toMatchInlineSnapshot(` -"\\"jest\\": { - \\"globals\\": { - \\"ts-jest\\": { - \\"tsConfig\\": { - \\"target\\": \\"es6\\" - } - } - }, - \\"moduleFileExtensions\\": [ - \\"js\\", - \\"ts\\", - \\"tsx\\" - ], - \\"testMatch\\": [ - \\"**/?(*.)+(spec|test).js?(x)\\", - \\"**/?(*.)+(spec|test).ts?(x)\\", - \\"**/__tests__/**/*.js?(x)\\", - \\"**/__tests__/**/*.ts?(x)\\" - ], - \\"preset\\": \\"ts-jest\\" -} -" -`) + "\\"jest\\": { + \\"globals\\": { + \\"ts-jest\\": { + \\"tsconfig\\": { + \\"target\\": \\"es6\\" + } + } + }, + \\"moduleFileExtensions\\": [ + \\"js\\", + \\"ts\\", + \\"tsx\\" + ], + \\"testMatch\\": [ + \\"**/?(*.)+(spec|test).js?(x)\\", + \\"**/?(*.)+(spec|test).ts?(x)\\", + \\"**/__tests__/**/*.js?(x)\\", + \\"**/__tests__/**/*.ts?(x)\\" + ], + \\"preset\\": \\"ts-jest\\" + } + " + `) }) it('should reset testMatch if testRegex is used', async () => { @@ -426,13 +426,13 @@ Migrated Jest configuration: ) const res = await runCli(...noOption, pkgPaths.current) expect(res.stdout).toMatchInlineSnapshot(` -"\\"jest\\": { - \\"testRegex\\": \\"foo-pattern\\", - \\"preset\\": \\"ts-jest\\", - \\"testMatch\\": null -} -" -`) + "\\"jest\\": { + \\"testRegex\\": \\"foo-pattern\\", + \\"preset\\": \\"ts-jest\\", + \\"testMatch\\": null + } + " + `) }) it('should detect best preset', async () => { @@ -444,31 +444,31 @@ Migrated Jest configuration: jest.doMock(pkgPaths.nextCfg, () => ({}), { virtual: true }) let res = await runCli(...noOption, pkgPaths.currentCfg) expect(res.stdout).toMatchInlineSnapshot(` -"module.exports = { - preset: 'ts-jest', -} -" -`) + "module.exports = { + preset: 'ts-jest', + } + " + `) // js-with-ts from args jest.doMock(pkgPaths.nextCfg, () => ({}), { virtual: true }) res = await runCli(...noOption, '--allow-js', pkgPaths.currentCfg) expect(res.stdout).toMatchInlineSnapshot(` -"module.exports = { - preset: 'ts-jest/presets/js-with-ts', -} -" -`) + "module.exports = { + preset: 'ts-jest/presets/js-with-ts', + } + " + `) // js-with-ts from previous transform jest.doMock(pkgPaths.nextCfg, () => ({ transform: { '^.+\\.[tj]sx?$': 'ts-jest' } }), { virtual: true }) res = await runCli(...noOption, pkgPaths.currentCfg) expect(res.stdout).toMatchInlineSnapshot(` -"module.exports = { - preset: 'ts-jest/presets/js-with-ts', -} -" -`) + "module.exports = { + preset: 'ts-jest/presets/js-with-ts', + } + " + `) // js-with-babel from previous transform jest.doMock(pkgPaths.nextCfg, () => ({ transform: { '^.+\\.jsx?$': 'babel-jest', '^.+\\.tsx?$': 'ts-jest' } }), { @@ -476,11 +476,11 @@ Migrated Jest configuration: }) res = await runCli(...noOption, pkgPaths.currentCfg) expect(res.stdout).toMatchInlineSnapshot(` -"module.exports = { - preset: 'ts-jest/presets/js-with-babel', -} -" -`) + "module.exports = { + preset: 'ts-jest/presets/js-with-babel', + } + " + `) // defaults when previous transform is ambiguous jest.doMock( @@ -490,15 +490,15 @@ Migrated Jest configuration: ) res = await runCli(...noOption, pkgPaths.currentCfg) expect(res.stdout).toMatchInlineSnapshot(` -"module.exports = { - transform: { - '^src/js/.+\\\\\\\\.jsx?$': 'babel-jest', - '^src/ts/.+\\\\\\\\.tsx?$': 'ts-jest', - }, - preset: 'ts-jest', -} -" -`) + "module.exports = { + transform: { + '^src/js/.+\\\\\\\\.jsx?$': 'babel-jest', + '^src/ts/.+\\\\\\\\.tsx?$': 'ts-jest', + }, + preset: 'ts-jest', + } + " + `) }) it('should normalize transform values', async () => { @@ -519,41 +519,41 @@ Migrated Jest configuration: ) const res = await runCli(...noOption, pkgPaths.current) expect(res.stdout).toMatchInlineSnapshot(` -"\\"jest\\": { - \\"transform\\": { - \\"/src/.+\\\\\\\\.[jt]s$\\": \\"ts-jest\\", - \\"foo\\\\\\\\.ts\\": \\"ts-jest\\", - \\"bar\\\\\\\\.ts\\": \\"ts-jest\\" - }, - \\"preset\\": \\"ts-jest\\" -} -" -`) + "\\"jest\\": { + \\"transform\\": { + \\"/src/.+\\\\\\\\.[jt]s$\\": \\"ts-jest\\", + \\"foo\\\\\\\\.ts\\": \\"ts-jest\\", + \\"bar\\\\\\\\.ts\\": \\"ts-jest\\" + }, + \\"preset\\": \\"ts-jest\\" + } + " + `) }) it('should output help', async () => { const res = await runCli('help', noOption[0]) expect(res).toMatchInlineSnapshot(` -Object { - "exitCode": 0, - "log": "", - "stderr": "", - "stdout": " -Usage: - ts-jest config:migrate [options] - -Arguments: - Can be a js or json Jest config file. If it is a - package.json file, the configuration will be read from - the \\"jest\\" property. - -Options: - --js ts|babel Process .js files with ts-jest if 'ts' or with - babel-jest if 'babel' - --no-jest-preset Disable the use of Jest presets -", -} -`) + Object { + "exitCode": 0, + "log": "", + "stderr": "", + "stdout": " + Usage: + ts-jest config:migrate [options] + + Arguments: + Can be a js or json Jest config file. If it is a + package.json file, the configuration will be read from + the \\"jest\\" property. + + Options: + --js ts|babel Process .js files with ts-jest if 'ts' or with + babel-jest if 'babel' + --no-jest-preset Disable the use of Jest presets + ", + } + `) }) }) // migrate }) // config diff --git a/src/config/config-set.spec.ts b/src/config/config-set.spec.ts index 95b0b50dd1..be1aa55eea 100644 --- a/src/config/config-set.spec.ts +++ b/src/config/config-set.spec.ts @@ -60,8 +60,8 @@ describe('parsedTsConfig', () => { expect(get().fileNames).toContain(normalizeSlashes(__filename)) }) - it.each(['tsConfig', 'tsconfig'])('should include compiler config from `%s` option key', (key: string) => { - expect(get({ [key]: { baseUrl: 'src/config' } }).options.baseUrl).toBe(normalizeSlashes(__dirname)) + it('should include compiler config from `%s` option key', () => { + expect(get({ tsconfig: { baseUrl: 'src/config' } }).options.baseUrl).toBe(normalizeSlashes(__dirname)) }) it('should include compiler config from base config', () => { diff --git a/src/config/config-set.ts b/src/config/config-set.ts index ae736bdc89..b1d6ef9308 100644 --- a/src/config/config-set.ts +++ b/src/config/config-set.ts @@ -274,10 +274,7 @@ export class ConfigSet { this.logger.debug({ diagnostics: this._diagnostics }, 'normalized diagnostics config via ts-jest option') // tsconfig - if (options.tsConfig) { - this.logger.warn(Deprecations.TsConfig) - } - const tsconfigOpt = options.tsConfig ?? options.tsconfig + const tsconfigOpt = options.tsconfig const configFilePath = typeof tsconfigOpt === 'string' ? this.resolvePath(tsconfigOpt) : undefined this.parsedTsConfig = this._resolveTsConfig( typeof tsconfigOpt === 'object' ? tsconfigOpt : undefined, diff --git a/src/transformers/path-mapping.spec.ts b/src/transformers/path-mapping.spec.ts index 8ecaf4e3b1..e24c1f404d 100644 --- a/src/transformers/path-mapping.spec.ts +++ b/src/transformers/path-mapping.spec.ts @@ -50,10 +50,10 @@ describe('path-mapping', () => { }, ])( 'should replace alias path with relative path which is resolved from paths tsconfig with js/ts extension', - (tsConfig) => { + (tsconfig) => { const configSet = createConfigSet({ tsJestConfig: { - tsConfig, + tsconfig, }, logger, }) diff --git a/src/types.ts b/src/types.ts index 1e930234ec..60d1247ffc 100644 --- a/src/types.ts +++ b/src/types.ts @@ -44,19 +44,6 @@ export interface TsJestGlobalOptions { * - `{...}`: an object with inline compiler options * * @default undefined uses the default tsconfig file - * @alias tsconfig - */ - tsConfig?: boolean | string | _ts.CompilerOptions - - /** - * Compiler options. It can be: - * - `true` (or `undefined`, it's the default): use default tsconfig file - * - `false`: do NOT use default config file - * - `path/to/tsconfig.json`: path to a specific tsconfig file ( can be used) - * - `{...}`: an object with inline compiler options - * - * @default undefined uses the default tsconfig file - * @alias tsConfig */ tsconfig?: boolean | string | _ts.CompilerOptions @@ -176,7 +163,7 @@ type TsJestConfig$babelConfig = TsJestConfig$babelConfig$file | TsJestConfig$bab * @internal */ export interface TsJestConfig { - tsConfig: TsJestConfig$tsConfig + tsconfig: TsJestConfig$tsConfig isolatedModules: boolean compiler: string diagnostics: TsJestDiagnosticsCfg diff --git a/src/utils/__snapshots__/backports.spec.ts.snap b/src/utils/__snapshots__/backports.spec.ts.snap index 77d85b21de..1a92b8d20f 100644 --- a/src/utils/__snapshots__/backports.spec.ts.snap +++ b/src/utils/__snapshots__/backports.spec.ts.snap @@ -66,7 +66,7 @@ exports[`backportJestConfig with "globals.__TS_CONFIG__" set to { foo: 'bar' } s Object { "globals": Object { "ts-jest": Object { - "tsConfig": Object { + "tsconfig": Object { "foo": "bar", }, }, @@ -76,7 +76,7 @@ Object { exports[`backportJestConfig with "globals.__TS_CONFIG__" set to { foo: 'bar' } should warn the user 1`] = ` Array [ - "[level:40] \\"[jest-config].globals.__TS_CONFIG__\\" is deprecated, use \\"[jest-config].globals.ts-jest.tsConfig\\" instead. + "[level:40] \\"[jest-config].globals.__TS_CONFIG__\\" is deprecated, use \\"[jest-config].globals.ts-jest.tsconfig\\" instead. ", "[level:40] Your Jest configuration is outdated. Use the CLI to help migrating it: ts-jest config:migrate . ", @@ -245,7 +245,7 @@ exports[`backportJestConfig with "globals.ts-jest.tsConfigFile" set to 'tsconfig Object { "globals": Object { "ts-jest": Object { - "tsConfig": "tsconfig.build.json", + "tsconfig": "tsconfig.build.json", }, }, } @@ -253,7 +253,7 @@ Object { exports[`backportJestConfig with "globals.ts-jest.tsConfigFile" set to 'tsconfig.build.json' should warn the user 1`] = ` Array [ - "[level:40] \\"[jest-config].globals.ts-jest.tsConfigFile\\" is deprecated, use \\"[jest-config].globals.ts-jest.tsConfig\\" instead. + "[level:40] \\"[jest-config].globals.ts-jest.tsConfigFile\\" is deprecated, use \\"[jest-config].globals.ts-jest.tsconfig\\" instead. ", "[level:40] Your Jest configuration is outdated. Use the CLI to help migrating it: ts-jest config:migrate . ", diff --git a/src/utils/backports.ts b/src/utils/backports.ts index dbd87f0a87..d37cf866a0 100644 --- a/src/utils/backports.ts +++ b/src/utils/backports.ts @@ -31,9 +31,9 @@ export const backportJestConfig =