You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observe the error: ReferenceError: exports is not defined
Expected behavior
Uncomment
// defaultsESMPatched.extensionsToTreatAsEsm =
// defaultsESMPatched.extensionsToTreatAsEsm?.filter(x => x !== '.mts');
in jest.config.ts and re-run npm run jest test/config.spec.ts - see no error.
Actual behavior
Error:
maxim@64QHKR3:~/google-api-typings-generator$ npm run jest test/config.spec.ts
> jest
> node --experimental-vm-modules node_modules/jest/bin/jest.js "test/config.spec.ts"
FAIL test/config.spec.ts
● Test suite failed to run
ReferenceError: exports is not defined
1 | import {supportedApis} from '../bin/auto-publish/config.js';
> 2 | import {excludedRestDescriptionIds} from '../src/app.js';
| ^
3 |
4 | describe('Config validation', () => {
5 | it('Excluded and supported APIs should not overlap', () => {
at test/config.spec.ts:2:23
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.964 s
Ran all test suites matching /test\/config.spec.ts/i.
(node:30622) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Version
29.0.2
Steps to reproduce
ts-jest-issue-repro-1
branch:git clone -b ts-jest-issue-repro-1 https://github.com/Maxim-Mazurok/google-api-typings-generator/tree/ts-jest-issue-repro-1
cd google-api-typings-generator
nvm i
npm ci
npm run jest test/config.spec.ts
ReferenceError: exports is not defined
Expected behavior
Uncomment
in
jest.config.ts
and re-runnpm run jest test/config.spec.ts
- see no error.Actual behavior
Error:
Debug log
https://gist.github.com/Maxim-Mazurok/d9b00b7493c49c40ea2594c72434d621
Additional context
mts was added here: #3713
Environment
The text was updated successfully, but these errors were encountered: