diff --git a/scripts/tests.js b/scripts/tests.js index 2bd482195c..a06cdf7bb3 100644 --- a/scripts/tests.js +++ b/scripts/tests.js @@ -13,11 +13,19 @@ function getDirectories(rootDir) { }); } +function isJestFolder(basename) { + return basename.startsWith('__') && basename.endsWith('__'); +} + +// TODO: later we could add a `.test-case-keep` empty file in each folder? +// ...or move all into a `test-cases` dedicated directory +function isTestCaseFolder(basename) { + return !isJestFolder(basename); +} + function createIntegrationMock() { const testsRoot = 'tests'; - const testCaseFolders = getDirectories(testsRoot).filter(function(testDir) { - return !/^(?:utils|__.+__)$/.test(testDir); - }); + const testCaseFolders = getDirectories(testsRoot).filter(isTestCaseFolder); testCaseFolders.forEach(directory => { const testCaseNodeModules = path.join(testsRoot, directory, 'node_modules'); @@ -41,9 +49,6 @@ function createIntegrationMock() { createIntegrationMock(); -// HACK: allow us to change the `startDir()` during tests -process.env.__RUNNING_TS_JEST_TESTS = Date.now(); - const argv = process.argv.slice(2); argv.push('--no-cache'); argv.push('--testPathPattern', '^(?!(.*watch.spec.ts$)).*'); diff --git a/src/preprocess.ts b/src/preprocess.ts index 9e954bd46c..064e901001 100644 --- a/src/preprocess.ts +++ b/src/preprocess.ts @@ -22,7 +22,11 @@ export default function preprocess( const isHtmlFile = /\.html$/.test(filePath); // This is to support angular 2. See https://github.com/kulshekhar/ts-jest/pull/145 - if (isHtmlFile && (jestConfig.globals as any).__TRANSFORM_HTML__) { + if ( + isHtmlFile && + jestConfig.globals && + (jestConfig.globals as any).__TRANSFORM_HTML__ + ) { src = 'module.exports=' + JSON.stringify(src) + ';'; } diff --git a/src/utils/get-ts-config.ts b/src/utils/get-ts-config.ts index c556a4112e..6c018303ed 100644 --- a/src/utils/get-ts-config.ts +++ b/src/utils/get-ts-config.ts @@ -95,19 +95,6 @@ function readCompilerOptions(configPath: string): CompilerOptions { return options; } -// function getStartDir(jestConfig: jest.ProjectConfig): string { -// // This is needed because of the way our tests are structured. -// // If this is being executed as a library (under node_modules) -// // we want to start with the project directory that's three -// // levels above. -// // If this is being executed from the test suite, we want to start -// // in the directory of the test - -// // TODO: shouldn't we use the path of jest config here instead of '.' ? -// // return process.env.__RUNNING_TS_JEST_TESTS ? process.cwd() : '.'; -// return process.env.__RUNNING_TS_JEST_TESTS ? process.cwd() : (jestConfig.rootDir || process.cwd()); -// } - // we don't need any data, just its full path const tsConfigReader = { basename: TSCONFIG_FILENAME, read: () => 0 }; diff --git a/tests/__helpers__/jest-config.ts b/tests/__helpers__/jest-config.ts deleted file mode 100644 index 61b8c7bcff..0000000000 --- a/tests/__helpers__/jest-config.ts +++ /dev/null @@ -1,210 +0,0 @@ -import { TsJestConfig } from '../../dist/types'; - -const { resolve } = require.requireActual('path'); - -function createJestConfig( - testModulePath: string, - tsJestOptions: TsJestConfig | null = null, - jestOptions: jest.InitialOptions = {}, -): jest.ProjectConfig { - const rootDir = resolve(__dirname, '..', testModulePath); - let options = { ...jestOptions }; - if (tsJestOptions) - options.globals = { ...options.globals, 'ts-jest': tsJestOptions }; - return { rootDir, cwd: rootDir, ...options } as any; -} -require('fs').read; -const jestConfig = Object.assign(createJestConfig, { - babelConfig: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('babel-config', t, j), - babelConfigInvalid: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('babel-config-invalid', t, j), - babelConfigMergeIgnoreBabelrc: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => createJestConfig('babel-config-merge-ignore-babelrc', t, j), - babelConfigMergeWithBabelrc: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => createJestConfig('babel-config-merge-with-babelrc', t, j), - button: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('button', t, j), - dynamicImports: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('dynamic-imports', t, j), - hoistErrors: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('hoist-errors', t, j), - hoistTest: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('hoist-test', t, j), - importsTest: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('imports-test', t, j), - jestProjects: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('jest-projects', t, j), - jestProjectsWithWorkspace: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => createJestConfig('jest-projects-with-workspace', t, j), - jestconfigTest: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('jestconfig-test', t, j), - metadataEmit: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('metadata-emit', t, j), - noJsonModuleFileExt: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('no-json-module-file-ext', t, j), - noSourcemaps: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('no-sourcemaps', t, j), - noSyntheticDefault: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('no-synthetic-default', t, j), - simple: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('simple', t, j), - simpleAsync: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('simple-async', t, j), - simpleLongPath: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('simple-long-path', t, j), - skipBabelrc: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('skip-babelrc', t, j), - syntheticDefault: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('synthetic-default', t, j), - tsDiagnostics: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('ts-diagnostics', t, j), - tsJestModuleInterface: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('ts-jest-module-interface', t, j), - tsconfigTest: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('tsconfig-test', t, j), - useBabelrc: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('use-babelrc', t, j), - useConfigFromNodeModules: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => createJestConfig('use-config-from-node-modules', t, j), - useStrict: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('use-strict', t, j), - utils: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('utils', t, j), - watchTest: (t?: TsJestConfig | null, j?: jest.InitialOptions) => - createJestConfig('watch-test', t, j), -}); - -interface TestJestConfigHelpers { - ( - testModulePath: string, - tsJestOptions?: TsJestConfig | null, - jestOptions?: jest.InitialOptions, - ): jest.ProjectConfig; - babelConfig: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - babelConfigInvalid: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - babelConfigMergeIgnoreBabelrc: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - babelConfigMergeWithBabelrc: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - button: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - dynamicImports: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - hoistErrors: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - hoistTest: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - importsTest: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - jestProjects: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - jestProjectsWithWorkspace: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - jestconfigTest: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - metadataEmit: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - noJsonModuleFileExt: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - noSourcemaps: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - noSyntheticDefault: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - simple: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - simpleAsync: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - simpleLongPath: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - skipBabelrc: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - syntheticDefault: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - tsDiagnostics: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - tsJestModuleInterface: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - tsconfigTest: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - useBabelrc: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - useConfigFromNodeModules: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - useStrict: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - utils: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; - watchTest: ( - t?: TsJestConfig | null, - j?: jest.InitialOptions, - ) => jest.ProjectConfig; -} - -export default jestConfig as TestJestConfigHelpers; diff --git a/tests/__helpers__/mock-jest-config.ts b/tests/__helpers__/mock-jest-config.ts new file mode 100644 index 0000000000..8981a549ad --- /dev/null +++ b/tests/__helpers__/mock-jest-config.ts @@ -0,0 +1,26 @@ +import { TsJestConfig } from '../../dist/types'; + +const { resolve } = require.requireActual('path'); + +/** + * Mock a jest config object for the test case in given folder + * + * Basically it defines `rootDir` and `cwd` properties to the full path of that + * test case, as Jest would do. + * + * Accepts an optional config object, which will be defined on `globals.ts-jest` + */ +export default function mockJestConfig( + testCaseFolder: string, + tsJest: TsJestConfig | null = null, +): jest.ProjectConfig { + // resolves the path since jest would give a resolved path + const rootDir = resolve(__dirname, '..', testCaseFolder); + // create base jest config object + let options: any = { rootDir, cwd: rootDir }; + // adds TS Jest options if any given + if (tsJest != null) { + options.globals = { 'ts-jest': tsJest }; + } + return options; +} diff --git a/tests/__tests__/get-cache-key.spec.ts b/tests/__tests__/get-cache-key.spec.ts index 9fff410267..d71ccab5b6 100644 --- a/tests/__tests__/get-cache-key.spec.ts +++ b/tests/__tests__/get-cache-key.spec.ts @@ -1,5 +1,5 @@ import getCacheKey from '../../dist/utils/get-cache-key'; -import cfg from '../__helpers__/jest-config'; +import mockJestConfig from '../__helpers__/mock-jest-config'; import _getTSConfig from '../../dist/utils/get-ts-config'; jest.mock('../../dist/utils/get-ts-config', () => { @@ -13,10 +13,11 @@ const getTSConfig: jest.Mock = _getTSConfig as any; describe('getCacheKey', () => { const src = 'console.log(123);'; - const jestConfig = cfg.simple(null, { + const jestConfig = { + ...mockJestConfig('simple'), transform: { '^.+\\\\.tsx?$': '../../preprocessor.js' }, testRegex: '(/__tests__/.*|(\\\\.|/)(test|spec))\\\\.(jsx?|tsx?)$', - }); + }; const filepath = `${jestConfig.rootDir}/some-file.ts`; const configStr = JSON.stringify(jestConfig); const options = { instrument: false, rootDir: jestConfig.rootDir }; diff --git a/tests/__tests__/html-transform.spec.ts b/tests/__tests__/html-transform.spec.ts index 718b5f797a..b25d88fa1c 100644 --- a/tests/__tests__/html-transform.spec.ts +++ b/tests/__tests__/html-transform.spec.ts @@ -1,32 +1,47 @@ import * as tsJest from '../../dist'; -import jestConfig from '../__helpers__/jest-config'; +import mockJestConfig from '../__helpers__/mock-jest-config'; -const config = jestConfig.simple({}); -const filePath = `${config.rootDir}/some-file.html`; +const TEST_CASE = 'simple'; +const FILENAME = 'some-file.html'; -// wrap a transformed source so that we can fake a `require()` on it by calling the returned wrapper -const wrap = (src: string) => - new Function(`var module={}; ${src} return module.exports;`) as any; - -const source = `
+const fileContent = `
This is element This is a backtilt \`
`; describe('Html transforms', () => { it('transforms html if config.globals.__TRANSFORM_HTML__ is set', () => { + let jestConfig; + // get the untransformed version - const untransformed = tsJest.process(source, filePath, { ...config }); - // ... then the one which should be transformed - (config.globals as any).__TRANSFORM_HTML__ = true; - const transformed = tsJest.process(source, filePath, config) as string; - // ... finally the result of a `require('module-with-transformed-version')` - const exported = wrap(transformed)(); + jestConfig = mockJestConfig(TEST_CASE); + const untransformed = tsJest.process( + fileContent, + `${jestConfig.rootDir}/${FILENAME}`, + jestConfig, + ); + expect(untransformed).toBe(fileContent); + expect(untransformed).toMatchSnapshot('untransformed'); - expect(exported).toMatchSnapshot('module'); + // ... then the one which should be transformed + jestConfig = { + ...mockJestConfig(TEST_CASE), + globals: { __TRANSFORM_HTML__: true }, + }; + const transformed = tsJest.process( + fileContent, + `${jestConfig.rootDir}/${FILENAME}`, + jestConfig, + ) as string; + expect(transformed).not.toBe(fileContent); expect(transformed).toMatchSnapshot('source'); - expect(untransformed).toMatchSnapshot('untransformed'); - // requiring the transformed version should return the same string as the untransformed version - expect(exported).toBe(untransformed); + + // ... finally the result of a `require('module-with-transformed-version')` + const value = eval( + `(function(){const module={}; ${transformed}; return module.exports;})()`, + ); + expect(value).toMatchSnapshot('module'); + // the value should be the same string as the source version + expect(value).toBe(fileContent); }); }); diff --git a/tests/__tests__/postprocess.spec.ts b/tests/__tests__/postprocess.spec.ts index 74792d0ac2..8e03b265a0 100644 --- a/tests/__tests__/postprocess.spec.ts +++ b/tests/__tests__/postprocess.spec.ts @@ -7,7 +7,7 @@ jest.mock('@babel/core', () => { }); import { getPostProcessHook } from '../../dist/postprocess'; -import jestConfig from '../__helpers__/jest-config'; +import mockJestConfig from '../__helpers__/mock-jest-config'; describe('postprocess', () => { function runHook(jestConfig = {} as any) { @@ -32,7 +32,7 @@ describe('postprocess', () => { const transformMock = require.requireMock('@babel/core').transform; runHook(); - getPostProcessHook(jestConfig.simple())( + getPostProcessHook(mockJestConfig('simple'))( { code: 'input_code', map: '"input_source_map"' }, 'fake_file', {} as any, diff --git a/tests/__tests__/tsconfig-comments.spec.ts b/tests/__tests__/tsconfig-comments.spec.ts index 7479c721f6..28aa8a7f1b 100644 --- a/tests/__tests__/tsconfig-comments.spec.ts +++ b/tests/__tests__/tsconfig-comments.spec.ts @@ -3,7 +3,9 @@ jest.mock('path'); import * as fs from 'fs'; import getTSConfig from '../../dist/utils/get-ts-config'; import * as path from 'path'; -import cfg from '../__helpers__/jest-config'; +import mockJestConfig from '../__helpers__/mock-jest-config'; + +const TEST_CASE = 'tsconfig-test'; describe('parse tsconfig with comments', () => { const configFile1 = './tests/tsconfig-test/allows-comments.json'; @@ -38,16 +40,16 @@ describe('parse tsconfig with comments', () => { // while allows-comments2.json does. // allow-comments.json extends allow-comments2.json it('should correctly read allow-comments.json', () => { - const config = getTSConfig( - cfg.tsconfigTest({ tsConfigFile: 'allows-comments.json' }), + const tsConfig = getTSConfig( + mockJestConfig(TEST_CASE, { tsConfigFile: 'allows-comments.json' }), ); - expect(config).toMatchSnapshot(); + expect(tsConfig).toMatchSnapshot(); }); it('should correctly read allow-comments2.json', () => { - const config = getTSConfig( - cfg.tsconfigTest({ tsConfigFile: 'allows-comments2.json' }), + const tsConfig = getTSConfig( + mockJestConfig(TEST_CASE, { tsConfigFile: 'allows-comments2.json' }), ); - expect(config).toMatchSnapshot(); + expect(tsConfig).toMatchSnapshot(); }); }); }); diff --git a/tests/__tests__/tsconfig-default.spec.ts b/tests/__tests__/tsconfig-default.spec.ts index dbfc24c89f..d9b3cae369 100644 --- a/tests/__tests__/tsconfig-default.spec.ts +++ b/tests/__tests__/tsconfig-default.spec.ts @@ -4,9 +4,11 @@ jest.mock('path'); import * as ts from 'typescript'; import getTSConfig from '../../dist/utils/get-ts-config'; import * as path from 'path'; -import jestConfig from '../__helpers__/jest-config'; +import mockJestConfig from '../__helpers__/mock-jest-config'; import getTSJestConfig from '../../dist/utils/get-ts-jest-config'; +const TEST_CASE = 'tsconfig-test'; + describe('get default ts config', () => { beforeEach(() => { // Set up some mocked out file info before each test @@ -19,44 +21,46 @@ describe('get default ts config', () => { // there is no tsconfig file in that test module ((path as any) as MockedPath).__setBaseDir('./tests/jestconfig-test'); - expect(() => getTSConfig(jestConfig.jestconfigTest(null))).toThrowError( + expect(() => getTSConfig(mockJestConfig('jestconfig-test'))).toThrowError( /unable to find ts configuration file/i, ); }); it('should correctly read tsconfig.json', () => { - const result = getTSConfig(jestConfig.tsconfigTest(null)); + const result = getTSConfig(mockJestConfig(TEST_CASE)); expect(result).toMatchSnapshot(); }); describe('new behavior (tsConfigFile & tsConfig)', () => { it('should be same results for null/undefined/etc.', () => { - const result = getTSConfig(jestConfig.tsconfigTest(null)); - const resultEmptyParam = getTSConfig(jestConfig.tsconfigTest({})); + const resultWithoutTsJestSection = getTSConfig( + mockJestConfig(TEST_CASE, null), + ); + const resultEmptyParam = getTSConfig(mockJestConfig(TEST_CASE, {})); const resultUndefinedContentFile = getTSConfig( - jestConfig.tsconfigTest({ tsConfigFile: undefined }), + mockJestConfig(TEST_CASE, { tsConfigFile: undefined }), ); const resultNullContentFile = getTSConfig( - jestConfig.tsconfigTest({ tsConfigFile: null }), + mockJestConfig(TEST_CASE, { tsConfigFile: null }), ); - expect(result).toEqual(resultEmptyParam); - expect(result).toEqual(resultUndefinedContentFile); - expect(result).toEqual(resultNullContentFile); + expect(resultEmptyParam).toEqual(resultWithoutTsJestSection); + expect(resultUndefinedContentFile).toEqual(resultWithoutTsJestSection); + expect(resultNullContentFile).toEqual(resultWithoutTsJestSection); }); it('should be different results for different rootDir with same jest config.', () => { - const rootConfig = getTSConfig(jestConfig.tsconfigTest()); + const rootConfig = getTSConfig(mockJestConfig(TEST_CASE)); const subConfig = getTSConfig( - jestConfig('tsconfig-test/tsconfig-module'), + mockJestConfig(`${TEST_CASE}/tsconfig-module`), ); expect(rootConfig).not.toEqual(subConfig); }); it('should not change the module if it is loaded from a non-default config file', () => { const config = getTSConfig( - jestConfig.tsconfigTest({ + mockJestConfig(TEST_CASE, { tsConfigFile: 'tsconfig-module/custom-config.json', }), ); @@ -73,7 +77,9 @@ describe('get default ts config', () => { './tests/tsconfig-test/tsconfig-module', ); - const config = getTSConfig(jestConfig('tsconfig-test/tsconfig-module')); + const config = getTSConfig( + mockJestConfig(`${TEST_CASE}/tsconfig-module`), + ); expect(config.module).toBe(ts.ModuleKind.CommonJS); }); diff --git a/tests/__tests__/tsconfig-string.spec.ts b/tests/__tests__/tsconfig-string.spec.ts index 5b4285783a..2267ac95e9 100644 --- a/tests/__tests__/tsconfig-string.spec.ts +++ b/tests/__tests__/tsconfig-string.spec.ts @@ -3,7 +3,9 @@ jest.mock('path'); import getTSConfig from '../../dist/utils/get-ts-config'; import * as ts from 'typescript'; import * as path from 'path'; -import cfg from '../__helpers__/jest-config'; +import mockJestConfig from '../__helpers__/mock-jest-config'; + +const TEST_CASE = 'tsconfig-test'; describe('get ts config from string', () => { beforeEach(() => { @@ -15,7 +17,7 @@ describe('get ts config from string', () => { describe('new behaviour (tsConfigFile & tsConfig)', () => { it('should correctly read my-tsconfig.json', () => { const result = getTSConfig( - cfg.tsconfigTest({ tsConfigFile: 'my-tsconfig.json' }), + mockJestConfig(TEST_CASE, { tsConfigFile: 'my-tsconfig.json' }), ); // snapshot would be enough here, but that adds a security in case we do not see it in a PR @@ -25,7 +27,7 @@ describe('get ts config from string', () => { it('should correctly resolve the "extends" directive', () => { const result = getTSConfig( - cfg.tsconfigTest({ tsConfigFile: 'extends-tsconfig.json' }), + mockJestConfig(TEST_CASE, { tsConfigFile: 'extends-tsconfig.json' }), ); // snapshot would be enough here, but that adds a security in case we do not see it in a PR @@ -35,7 +37,7 @@ describe('get ts config from string', () => { it('should correctly override any config in the "extends" directive', () => { const result = getTSConfig( - cfg.tsconfigTest({ + mockJestConfig(TEST_CASE, { tsConfigFile: 'extends-with-overrides-tsconfig.json', }), );