Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle tsBuildInfoFile option #1096

Merged
merged 1 commit into from Sep 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions e2e/__cases__/composite/foo.spec.ts
@@ -0,0 +1,3 @@
test('foo', () => {
expect(true).toBeTruthy();
});
6 changes: 6 additions & 0 deletions e2e/__cases__/composite/tsconfig.json
@@ -0,0 +1,6 @@
{
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": ".tsbuildinfo"
}
}
6 changes: 3 additions & 3 deletions e2e/__templates__/default/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/__templates__/default/package.json
Expand Up @@ -6,7 +6,7 @@
"@types/jest": "24.0.6",
"@types/node": "10.12.5",
"jest": "24.9.0",
"typescript": "3.1.6"
"typescript": "3.4.5"
},
"wantedDependencies": {
"@types/jest": "latest",
Expand Down
8 changes: 4 additions & 4 deletions e2e/__tests__/__snapshots__/test-helpers.test.ts.snap
Expand Up @@ -11,10 +11,10 @@ exports[`test-helpers 1`] = `
● Test suite failed to run

TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
fail.spec.ts:7:10 - error TS2554: Expected 0 arguments, but got 1.
fail.spec.ts:7:22 - error TS2554: Expected 0 arguments, but got 1.

7 expect(mocked(foo)('hello')).toBeUndefined()
~~~~~~~~~~~~~~~~~~~~
~~~~~~~
fail.spec.ts:9:46 - error TS2345: Argument of type '42' is not assignable to parameter of type 'string'.

9 expect(mocked(bar, true).dummy.deep.deeper(42)).toBeUndefined()
Expand Down Expand Up @@ -42,10 +42,10 @@ exports[`with esModuleInterop set to false 1`] = `
● Test suite failed to run

TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
fail.spec.ts:7:10 - error TS2554: Expected 0 arguments, but got 1.
fail.spec.ts:7:22 - error TS2554: Expected 0 arguments, but got 1.

7 expect(mocked(foo)('hello')).toBeUndefined()
~~~~~~~~~~~~~~~~~~~~
~~~~~~~
fail.spec.ts:9:46 - error TS2345: Argument of type '42' is not assignable to parameter of type 'string'.

9 expect(mocked(bar, true).dummy.deep.deeper(42)).toBeUndefined()
Expand Down
13 changes: 13 additions & 0 deletions e2e/__tests__/composite.test.ts
@@ -0,0 +1,13 @@
import { PackageSets } from '../__helpers__/templates'
import { configureTestCase } from '../__helpers__/test-case'

describe('with composite enabled', () => {
const testCase = configureTestCase('composite')

testCase.runWithTemplates([PackageSets.default], 0, (runTest, { testLabel }) => {
it(testLabel, () => {
const result = runTest()
expect(result.status).toBe(0)
})
})
})
2 changes: 2 additions & 0 deletions src/config/config-set.ts
Expand Up @@ -551,7 +551,9 @@ export class ConfigSet {
declarationDir: undefined,
declarationMap: undefined,
emitDeclarationOnly: undefined,
incremental: undefined,
sourceRoot: undefined,
tsBuildInfoFile: undefined,
}
// force the module kind if not piping babel-jest
if (!this.tsJest.babelConfig) {
Expand Down