feat(config): if process.features.typescript
is set, load jest.config.ts
without external loader
#14399
Annotations
10 errors and 2 warnings
run tests:
e2e/__tests__/readInitialOptions.test.ts#L96
expect(received).toContain(expected) // indexOf
Matcher error: received value must not be null nor undefined
Received has value: undefined
at Object.toContain (e2e/__tests__/readInitialOptions.test.ts:96:27)
|
run tests:
e2e/__tests__/jest.config.ts.test.ts#L29
expect(received).toMatchSnapshot()
Snapshot name: `works with jest.config.ts 1`
- Snapshot - 0
+ Received + 2
+ (node:2652) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
+ (Use `node --trace-warnings ...` to show where the warning was created)
PASS __tests__/a-giraffe.js
✓ giraffe
at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:29:16)
|
run tests:
e2e/__tests__/jest.config.ts.test.ts#L45
expect(received).toMatchSnapshot()
Snapshot name: `works with tsconfig.json 1`
- Snapshot - 0
+ Received + 2
+ (node:4980) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
+ (Use `node --trace-warnings ...` to show where the warning was created)
PASS __tests__/a-giraffe.js
✓ giraffe
at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:45:16)
|
run tests:
e2e/__tests__/jest.config.ts.test.ts#L69
expect(received).toMatchSnapshot()
Snapshot name: `traverses directory tree up until it finds jest.config 1`
- Snapshot - 1
+ Received + 1
console.log
<<REPLACED>>/jest-config-ts/some/nested/directory
- at Object.<anonymous> (__tests__/a-giraffe.js:3:27)
+ at Object.log (__tests__/a-giraffe.js:3:27)
↵
at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:69:62)
|
run tests:
e2e/__tests__/jest.config.ts.test.ts#L73
expect(received).toMatchSnapshot()
Snapshot name: `traverses directory tree up until it finds jest.config 2`
- Snapshot - 0
+ Received + 2
+ (node:6820) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
+ (Use `node --trace-warnings ...` to show where the warning was created)
PASS ../../../__tests__/a-giraffe.js
✓ giraffe
✓ abc
at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:73:16)
|
run tests:
e2e/__tests__/jest.config.ts.test.ts#L121
expect(received).toMatch(expected)
Expected substring: "TSError: ⨯ Unable to compile TypeScript:"
Received string: "Error: Jest: Failed to parse the TypeScript config file D:\\a\\jest\\jest\\e2e\\jest-config-ts\\jest.config.ts
SyntaxError [ERR_INVALID_TYPESCRIPT_SYNTAX]: x Expected ';', got 'string literal (ll break this file yo, 'll break this file yo)'
,----
1 | export default i'll break this file yo
: ^^^^^^^^^^^^^^^^^^^^^^
`----
x Unterminated string constant
,----
1 | export default i'll break this file yo
: ^^^^^^^^^^^^^^^^^^^^^^
`----··
Caused by:
failed to parse
at readConfigFileAndSetRootDir (D:\\a\\jest\\jest\\packages\\jest-config\\build\\index.js:2249:13)
at async readInitialOptions (D:\\a\\jest\\jest\\packages\\jest-config\\build\\index.js:1153:13)
at async readConfig (D:\\a\\jest\\jest\\packages\\jest-config\\build\\index.js:924:7)
at async readConfigs (D:\\a\\jest\\jest\\packages\\jest-config\\build\\index.js:1174:26)
at async runCLI (D:\\a\\jest\\jest\\packages\\jest-core\\build\\index.js:1384:7)
at async Object.run (D:\\a\\jest\\jest\\packages\\jest-cli\\build\\index.js:657:9)"
at Object.toMatch (e2e/__tests__/jest.config.ts.test.ts:121:18)
|
run tests:
e2e/__tests__/readInitialOptions.test.ts#L96
expect(received).toContain(expected) // indexOf
Matcher error: received value must not be null nor undefined
Received has value: undefined
at Object.toContain (e2e/__tests__/readInitialOptions.test.ts:96:27)
|
run tests:
e2e/__tests__/jest.config.ts.test.ts#L29
expect(received).toMatchSnapshot()
Snapshot name: `works with jest.config.ts 1`
- Snapshot - 0
+ Received + 2
+ (node:5184) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
+ (Use `node --trace-warnings ...` to show where the warning was created)
PASS __tests__/a-giraffe.js
✓ giraffe
at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:29:16)
|
run tests:
e2e/__tests__/jest.config.ts.test.ts#L45
expect(received).toMatchSnapshot()
Snapshot name: `works with tsconfig.json 1`
- Snapshot - 0
+ Received + 2
+ (node:492) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
+ (Use `node --trace-warnings ...` to show where the warning was created)
PASS __tests__/a-giraffe.js
✓ giraffe
at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:45:16)
|
run tests:
e2e/__tests__/jest.config.ts.test.ts#L69
expect(received).toMatchSnapshot()
Snapshot name: `traverses directory tree up until it finds jest.config 1`
- Snapshot - 1
+ Received + 1
console.log
<<REPLACED>>/jest-config-ts/some/nested/directory
- at Object.<anonymous> (__tests__/a-giraffe.js:3:27)
+ at Object.log (__tests__/a-giraffe.js:3:27)
↵
at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:69:62)
|
run tests
Attempt 1 failed. Reason: Child_process exited with error code 1
|
run tests
Attempt 2 failed. Reason: Child_process exited with error code 1
|
Loading