Files
jest/e2e/__tests__/__snapshots__/jest.config.ts.test.ts.snap

108 lines
3.3 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1`] = `
"PASS __tests__/a-giraffe.js
✓ giraffe"
`;
exports[`falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2`] = `
"Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites."
`;
exports[`on node >=24 invalid JS in jest.config.ts (node with native TS support) 1`] = `
"Error: Jest: Failed to parse the TypeScript config file <<REPLACED>>
both with the native node TypeScript support and configured TypeScript loaders.
Errors were:
- SyntaxError [ERR_INVALID_TYPESCRIPT_SYNTAX]: Expected ';', got 'string literal'
- TSError: ⨯ Unable to compile TypeScript:
jest.config.ts(1,16): error TS2304: Cannot find name 'i'.
jest.config.ts(1,17): error TS1005: ';' expected.
jest.config.ts(1,39): error TS1002: Unterminated string literal."
`;
exports[`on node ^23.6 invalid JS in jest.config.ts (node with native TS support) 1`] = `
"Error: Jest: Failed to parse the TypeScript config file <<REPLACED>>
both with the native node TypeScript support and configured TypeScript loaders.
Errors were:
- 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
: ^^^^^^^^^^^^^^^^^^^^^^
\`----
- TSError: ⨯ Unable to compile TypeScript:
jest.config.ts(1,16): error TS2304: Cannot find name 'i'.
jest.config.ts(1,17): error TS1005: ';' expected.
jest.config.ts(1,39): error TS1002: Unterminated string literal."
`;
exports[`on node ^23.6 load typed jest.config.ts with TS loader specified in docblock pragma 1`] = `
"PASS __tests__/a-giraffe.js
✓ giraffe"
`;
exports[`on node ^23.6 load typed jest.config.ts with TS loader specified in docblock pragma 2`] = `
"Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites."
`;
exports[`traverses directory tree up until it finds jest.config 1`] = `
" console.log
<<REPLACED>>/jest-config-ts/some/nested/directory
at Object.<anonymous> (__tests__/a-giraffe.js:3:27)
"
`;
exports[`traverses directory tree up until it finds jest.config 2`] = `
"PASS ../../../__tests__/a-giraffe.js
✓ giraffe
✓ abc"
`;
exports[`traverses directory tree up until it finds jest.config 3`] = `
"Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites."
`;
exports[`works with jest.config.ts 1`] = `
"PASS __tests__/a-giraffe.js
✓ giraffe"
`;
exports[`works with jest.config.ts 2`] = `
"Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites."
`;
exports[`works with tsconfig.json 1`] = `
"PASS __tests__/a-giraffe.js
✓ giraffe"
`;
exports[`works with tsconfig.json 2`] = `
"Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites."
`;