Skip to content

Commit b02032d

Browse files
committed
test
1 parent 841380a commit b02032d

File tree

8 files changed

+15
-9
lines changed

8 files changed

+15
-9
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
"start:debug": "nest start --debug --watch",
1717
"start:prod": "node dist/main",
1818
"lint": "eslint \"{src,apps,libs,test,prisma}/**/*.ts\"",
19-
"test": "jest --projects src",
20-
"test:watch": "jest --projects src --watch",
21-
"test:cov": "jest --projects src --coverage",
22-
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --projects src --runInBand",
23-
"test:e2e": "jest --projects test",
24-
"test:acceptance": "jest --projects test_acceptance",
25-
"test:ldap": "jest --projects test_ldap"
19+
"test": "NODE_OPTIONS='--experimental-vm-modules' jest --projects src",
20+
"test:watch": "NODE_OPTIONS='--experimental-vm-modules' jest --projects src --watch",
21+
"test:cov": "NODE_OPTIONS='--experimental-vm-modules' jest --projects src --coverage",
22+
"test:debug": "node --experimental-vm-modules --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --projects src --runInBand",
23+
"test:e2e": "NODE_OPTIONS='--experimental-vm-modules' jest --projects test",
24+
"test:acceptance": "NODE_OPTIONS='--experimental-vm-modules' jest --projects test_acceptance",
25+
"test:ldap": "NODE_OPTIONS='--experimental-vm-modules' jest --projects test_ldap"
2626
},
2727
"engines": {
2828
"node": ">=20"

prisma/jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ module.exports = {
33
preset: 'ts-jest',
44
testEnvironment: 'node',
55
setupFilesAfterEnv: ['<rootDir>/test/client.mock.ts'],
6+
extensionsToTreatAsEsm: ['.ts'],
7+
transformIgnorePatterns: ['node_modules/(?!(pixelmatch)/)'],
68
};

prisma/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"private": true,
77
"license": "Apache-2.0",
88
"scripts": {
9-
"test": "jest",
9+
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
1010
"postinstall": "prisma generate"
1111
},
1212
"dependencies": {

prisma/schema.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
generator client {
22
provider = "prisma-client-js"
3-
output = "../node_modules/.prisma/client"
3+
output = "./node_modules/.prisma/client"
44
binaryTargets = ["native", "debian-openssl-3.0.x", "linux-arm64-openssl-3.0.x"]
55
}
66

src/jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = async () => {
44
displayName: 'Unit Tests',
55
roots: ['./'],
66
moduleFileExtensions: ['js', 'json', 'ts'],
7+
extensionsToTreatAsEsm: ['.ts'],
78
transform: {
89
'^.+\\.(t|j)s$': 'ts-jest',
910
},

test/jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = async () => {
77
roots: ['./'],
88
testTimeout: 30000,
99
testRegex: '.e2e-spec.ts$',
10+
extensionsToTreatAsEsm: ['.ts'],
1011
transform: {
1112
...createDefaultPreset().transform,
1213
},

test_acceptance/jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = async () => {
66
testTimeout: 30000,
77
testRegex: '.spec.ts$',
88
moduleFileExtensions: ['js', 'json', 'ts'],
9+
extensionsToTreatAsEsm: ['.ts'],
910
transform: {
1011
'^.+\\.(t|j)s$': 'ts-jest',
1112
},

test_ldap/jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = async () => {
66
testTimeout: 30000,
77
testRegex: '.spec.ts$',
88
moduleFileExtensions: ['js', 'json', 'ts'],
9+
extensionsToTreatAsEsm: ['.ts'],
910
transform: {
1011
'^.+\\.(t|j)s$': 'ts-jest',
1112
},

0 commit comments

Comments
 (0)