Skip to content

Commit 623b2f4

Browse files
committed
feat(config): typeCheck default to true (langauge service)
Renames `typeCheck` to `isolatedModules`. Default value (`false`) did not change, but that actually means the opposite BREAKING CHANGE: Language service will be used by default from now on
1 parent de5c967 commit 623b2f4

38 files changed

Lines changed: 1159 additions & 87 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
- [Logging](#logging)
4141
- [Known Limitations](#known-limitations)
4242
- [Known limitations for TS compiler options](#known-limitations-for-ts-compiler-options)
43-
- [`const enum` is not supported if `typeCheck` is not enabled](#const-enum-is-not-supported-if-typecheck-is-not-enabled)
43+
- [`const enum` is not supported if `isolatedModules` is enabled](#const-enum-is-not-supported-if-isolatedmodules-is-enabled)
4444
- [How to Contribute](#how-to-contribute)
4545
- [Quickstart to run tests (only if you're working on this package)](#quickstart-to-run-tests-only-if-youre-working-on-this-package)
4646
- [License](#license)
@@ -405,7 +405,7 @@ If you use `"baseUrl": "<path_to_your_sources>"`, you also have to change `jest
405405
}
406406
```
407407

408-
### `const enum` is not supported if `typeCheck` is not enabled
408+
### `const enum` is not supported if `isolatedModules` is enabled
409409

410410
This is due to a limitation in the ts-jest basic processor which compiles each test file individually, therefore ignoring implementations of ambient declarations. The TypeScript team currently have [no plan to support const enum inlining](https://github.com/Microsoft/TypeScript/issues/5243) for this particular compiler method. See [#112](https://github.com/kulshekhar/ts-jest/issues/112) and [#281](https://github.com/kulshekhar/ts-jest/issues/281) for more information.
411411

e2e/__helpers__/test-case/run-result.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default class RunResult {
4848
try {
4949
io = require(`${this.context.ioDir}/${relFilePath}.json`)
5050
} catch (err) {
51-
io.out = `/* ts-jest after hook has not been called! ${err} */`
51+
io.out = `/*\nts-jest after hook has not been called!\n${err}\noutput:\n${this.output}*/`
5252
}
5353
return new ProcessedFileIo(this.cwd, relFilePath, io.in, io.out)
5454
}

e2e/__templates__/default/package-lock.json

Lines changed: 10 additions & 4 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
"private": true,
55
"devDependencies": {
66
"@types/jest": "23.3.1",
7+
"@types/node": "10.9.4",
78
"jest": "23.5.0",
89
"typescript": "3.0.3"
910
},
1011
"wantedDependencies": {
1112
"@types/jest": "latest",
13+
"@types/node": "latest",
1214
"jest": "latest",
1315
"typescript": "latest"
1416
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"compilerOptions": {
3+
"types": [
4+
"jest", "node"
5+
]
6+
}
7+
}

e2e/__templates__/with-babel-6/package-lock.json

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

e2e/__templates__/with-babel-6/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
"private": true,
55
"devDependencies": {
66
"@types/jest": "23.3.1",
7+
"@types/node": "10.9.4",
78
"babel-core": "6.26.3",
89
"jest": "23.5.0",
910
"typescript": "3.0.3"
1011
},
1112
"wantedDependencies": {
1213
"@types/jest": "latest",
14+
"@types/node": "latest",
1315
"babel-core": "6",
1416
"jest": "latest",
1517
"typescript": "latest"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"compilerOptions": {
3+
"types": [
4+
"jest", "node"
5+
]
6+
}
7+
}

e2e/__templates__/with-babel-7/package-lock.json

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

e2e/__templates__/with-babel-7/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
"devDependencies": {
66
"@babel/core": "7.0.0",
77
"@types/jest": "23.3.1",
8+
"@types/node": "10.9.4",
89
"babel-core": "7.0.0-bridge.0",
910
"jest": "23.5.0",
1011
"typescript": "3.0.3"
1112
},
1213
"wantedDependencies": {
1314
"@babel/core": "7",
1415
"@types/jest": "latest",
16+
"@types/node": "latest",
1517
"babel-core": "7.0.0-bridge.0",
1618
"jest": "latest",
1719
"typescript": "latest"

0 commit comments

Comments
 (0)