Skip to content

Commit f9583e9

Browse files
committed
fix: handle tsBuildInfoFile option
Fixes #1095
1 parent 7ac9f42 commit f9583e9

File tree

7 files changed

+32
-8
lines changed

7 files changed

+32
-8
lines changed

e2e/__cases__/composite/foo.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test('foo', () => {
2+
expect(true).toBeTruthy();
3+
});

e2e/__cases__/composite/tsconfig.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"compilerOptions": {
3+
"composite": true,
4+
"tsBuildInfoFile": ".tsbuildinfo"
5+
}
6+
}

e2e/__templates__/default/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/__templates__/default/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@types/jest": "24.0.6",
77
"@types/node": "10.12.5",
88
"jest": "24.9.0",
9-
"typescript": "3.1.6"
9+
"typescript": "3.4.5"
1010
},
1111
"wantedDependencies": {
1212
"@types/jest": "latest",

e2e/__tests__/__snapshots__/test-helpers.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ exports[`test-helpers 1`] = `
1111
● Test suite failed to run
1212
1313
TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
14-
fail.spec.ts:7:10 - error TS2554: Expected 0 arguments, but got 1.
14+
fail.spec.ts:7:22 - error TS2554: Expected 0 arguments, but got 1.
1515
1616
7 expect(mocked(foo)('hello')).toBeUndefined()
17-
~~~~~~~~~~~~~~~~~~~~
17+
~~~~~~~
1818
fail.spec.ts:9:46 - error TS2345: Argument of type '42' is not assignable to parameter of type 'string'.
1919
2020
9 expect(mocked(bar, true).dummy.deep.deeper(42)).toBeUndefined()
@@ -42,10 +42,10 @@ exports[`with esModuleInterop set to false 1`] = `
4242
● Test suite failed to run
4343
4444
TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
45-
fail.spec.ts:7:10 - error TS2554: Expected 0 arguments, but got 1.
45+
fail.spec.ts:7:22 - error TS2554: Expected 0 arguments, but got 1.
4646
4747
7 expect(mocked(foo)('hello')).toBeUndefined()
48-
~~~~~~~~~~~~~~~~~~~~
48+
~~~~~~~
4949
fail.spec.ts:9:46 - error TS2345: Argument of type '42' is not assignable to parameter of type 'string'.
5050
5151
9 expect(mocked(bar, true).dummy.deep.deeper(42)).toBeUndefined()

e2e/__tests__/composite.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { PackageSets } from '../__helpers__/templates'
2+
import { configureTestCase } from '../__helpers__/test-case'
3+
4+
describe('with composite enabled', () => {
5+
const testCase = configureTestCase('composite')
6+
7+
testCase.runWithTemplates([PackageSets.default], 0, (runTest, { testLabel }) => {
8+
it(testLabel, () => {
9+
const result = runTest()
10+
expect(result.status).toBe(0)
11+
})
12+
})
13+
})

src/config/config-set.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,9 @@ export class ConfigSet {
551551
declarationDir: undefined,
552552
declarationMap: undefined,
553553
emitDeclarationOnly: undefined,
554+
incremental: undefined,
554555
sourceRoot: undefined,
556+
tsBuildInfoFile: undefined,
555557
}
556558
// force the module kind if not piping babel-jest
557559
if (!this.tsJest.babelConfig) {

0 commit comments

Comments
 (0)