We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 963b8cf commit 2a99b2cCopy full SHA for 2a99b2c
apollo-server/v4/integration-testing/jest.config.cjs
@@ -2,11 +2,14 @@
2
module.exports = {
3
preset: 'ts-jest',
4
testEnvironment: 'node',
5
+ extensionsToTreatAsEsm: ['.ts'],
6
+ testPathIgnorePatterns: ['.js'],
7
globals: {
8
// when we are testing we want to use a slightly different config
9
// to allow for jest types
10
'ts-jest': {
11
tsconfig: '<rootDir>/src/__tests__/tsconfig.json',
12
+ useESM: true,
13
},
14
15
};
apollo-server/v4/integration-testing/package.json
@@ -6,7 +6,7 @@
"type": "module",
"license": "MIT",
"scripts": {
- "test": "npm run compile && jest",
+ "test": "npm run compile && node --experimental-vm-modules node_modules/jest/bin/jest.js",
"postinstall": "npm run compile",
"compile": "tsc",
"start": "npm run compile && node ./dist/server.js"
0 commit comments