Skip to content

Commit c6b1920

Browse files
authored
chore: Add node_modules/dist to ignore + convert config to .ts (calcom#22852)
1 parent 9193221 commit c6b1920

5 files changed

Lines changed: 48 additions & 34 deletions

File tree

apps/api/v2/jest-e2e.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

apps/api/v2/jest-e2e.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type { Config } from "jest";
2+
3+
const config: Config = {
4+
preset: "ts-jest",
5+
moduleFileExtensions: ["js", "json", "ts"],
6+
rootDir: ".",
7+
moduleNameMapper: {
8+
"@/(.*)": "<rootDir>/src/$1",
9+
"test/(.*)": "<rootDir>/test/$1",
10+
},
11+
testEnvironment: "node",
12+
testRegex: ".e2e-spec.ts$",
13+
transform: {
14+
"^.+\\.ts$": "ts-jest",
15+
},
16+
setupFiles: ["<rootDir>/test/setEnvVars.ts", "jest-date-mock"],
17+
setupFilesAfterEnv: ["<rootDir>/test/jest.setup-e2e.ts"],
18+
reporters: ["default", "jest-summarizing-reporter"],
19+
workerIdleMemoryLimit: "512MB",
20+
maxWorkers: 8,
21+
testPathIgnorePatterns: ["/dist/", "/node_modules/"],
22+
transformIgnorePatterns: ["/dist/", "/node_modules/"],
23+
};
24+
25+
export default config;

apps/api/v2/jest.config.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

apps/api/v2/jest.config.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import type { Config } from "jest";
2+
3+
const config: Config = {
4+
preset: "ts-jest",
5+
moduleFileExtensions: ["ts", "js", "json"],
6+
rootDir: ".",
7+
moduleNameMapper: {
8+
"@/(.*)": "<rootDir>/src/$1",
9+
"test/(.*)": "<rootDir>/test/$1",
10+
},
11+
testEnvironment: "node",
12+
testRegex: ".*\\.spec\\.ts$",
13+
transform: {
14+
"^.+\\.ts$": "ts-jest",
15+
},
16+
setupFiles: ["<rootDir>/test/setEnvVars.ts"],
17+
testPathIgnorePatterns: ["/dist/", "/node_modules/"],
18+
transformIgnorePatterns: ["/dist/", "/node_modules/"],
19+
};
20+
21+
export default config;

apps/api/v2/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"test:watch": "yarn dev:build && jest --watch",
2626
"test:cov": "yarn dev:build && jest --coverage",
2727
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
28-
"test:e2e": "yarn dev:build && NODE_OPTIONS='--max_old_space_size=8192 --experimental-vm-modules' jest --ci --forceExit --config ./jest-e2e.json",
28+
"test:e2e": "yarn dev:build && NODE_OPTIONS='--max_old_space_size=8192 --experimental-vm-modules' jest --ci --forceExit --config ./jest-e2e.ts",
2929
"test:e2e:local": "yarn test:e2e --maxWorkers=4",
30-
"test:e2e:watch": "yarn dev:build && jest --runInBand --detectOpenHandles --forceExit --config ./jest-e2e.json --watch",
30+
"test:e2e:watch": "yarn dev:build && jest --runInBand --detectOpenHandles --forceExit --config ./jest-e2e.ts --watch",
3131
"prisma": "yarn workspace @calcom/prisma prisma",
3232
"generate-schemas": "yarn prisma generate && yarn prisma format",
3333
"copy-swagger-module": "ts-node -r tsconfig-paths/register swagger/copy-swagger-module.ts",

0 commit comments

Comments
 (0)