Scheduling infrastructure for absolutely everyone.
chore: Add node_modules/dist to ignore + convert config to .ts (#22852)
Alex van Andelc6b19200a95f
diff --git a/apps/api/v2/jest-e2e.json b/apps/api/v2/jest-e2e.jsondeleted file mode 100644index 99899c6a15b..00000000000--- a/apps/api/v2/jest-e2e.json+++ /dev/null@@ -1,18 +0,0 @@-{- "moduleFileExtensions": ["js", "json", "ts"],- "rootDir": ".",- "moduleNameMapper": {- "@/(.*)": "<rootDir>/src/$1",- "test/(.*)": "<rootDir>/test/$1"- },- "testEnvironment": "node",- "testRegex": ".e2e-spec.ts$",- "transform": {- "^.+\\.(t|j)s$": "ts-jest"- },- "setupFiles": ["<rootDir>/test/setEnvVars.ts", "jest-date-mock"],- "setupFilesAfterEnv": ["<rootDir>/test/jest.setup-e2e.ts"],- "reporters": ["default", "jest-summarizing-reporter"],- "workerIdleMemoryLimit": "512MB",- "maxWorkers": 8-}diff --git a/apps/api/v2/jest-e2e.ts b/apps/api/v2/jest-e2e.tsnew file mode 100644index 00000000000..6f87c2bc683--- /dev/null+++ b/apps/api/v2/jest-e2e.ts@@ -0,0 +1,25 @@+import type { Config } from "jest";++const config: Config = {+ preset: "ts-jest",+ moduleFileExtensions: ["js", "json", "ts"],+ rootDir: ".",+ moduleNameMapper: {+ "@/(.*)": "<rootDir>/src/$1",+ "test/(.*)": "<rootDir>/test/$1",+ },+ testEnvironment: "node",+ testRegex: ".e2e-spec.ts$",+ transform: {+ "^.+\\.ts$": "ts-jest",+ },+ setupFiles: ["<rootDir>/test/setEnvVars.ts", "jest-date-mock"],+ setupFilesAfterEnv: ["<rootDir>/test/jest.setup-e2e.ts"],+ reporters: ["default", "jest-summarizing-reporter"],+ workerIdleMemoryLimit: "512MB",+ maxWorkers: 8,+ testPathIgnorePatterns: ["/dist/", "/node_modules/"],+ transformIgnorePatterns: ["/dist/", "/node_modules/"],+};++export default config;diff --git a/apps/api/v2/jest.config.json b/apps/api/v2/jest.config.jsondeleted file mode 100644index a7b6a8c8885..00000000000--- a/apps/api/v2/jest.config.json+++ /dev/null@@ -1,14 +0,0 @@-{- "moduleFileExtensions": ["js", "json", "ts"],- "rootDir": ".",- "moduleNameMapper": {- "@/(.*)": "<rootDir>/src/$1",- "test/(.*)": "<rootDir>/test/$1"- },- "testEnvironment": "node",- "testRegex": ".*\\.spec\\.ts$",- "transform": {- "^.+\\.ts$": "ts-jest"- },- "setupFiles": ["<rootDir>/test/setEnvVars.ts"]-}diff --git a/apps/api/v2/jest.config.ts b/apps/api/v2/jest.config.tsnew file mode 100644index 00000000000..5ac6804bdc5--- /dev/null+++ b/apps/api/v2/jest.config.ts@@ -0,0 +1,21 @@+import type { Config } from "jest";++const config: Config = {+ preset: "ts-jest",+ moduleFileExtensions: ["ts", "js", "json"],+ rootDir: ".",+ moduleNameMapper: {+ "@/(.*)": "<rootDir>/src/$1",+ "test/(.*)": "<rootDir>/test/$1",+ },+ testEnvironment: "node",+ testRegex: ".*\\.spec\\.ts$",+ transform: {+ "^.+\\.ts$": "ts-jest",+ },+ setupFiles: ["<rootDir>/test/setEnvVars.ts"],+ testPathIgnorePatterns: ["/dist/", "/node_modules/"],+ transformIgnorePatterns: ["/dist/", "/node_modules/"],+};++export default config;diff --git a/apps/api/v2/package.json b/apps/api/v2/package.jsonindex c8195e03fd8..1adea0f4c53 100644--- a/apps/api/v2/package.json+++ b/apps/api/v2/package.json@@ -25,9 +25,9 @@"test:watch": "yarn dev:build && jest --watch","test:cov": "yarn dev:build && jest --coverage","test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",- "test:e2e": "yarn dev:build && NODE_OPTIONS='--max_old_space_size=8192 --experimental-vm-modules' jest --ci --forceExit --config ./jest-e2e.json",+ "test:e2e": "yarn dev:build && NODE_OPTIONS='--max_old_space_size=8192 --experimental-vm-modules' jest --ci --forceExit --config ./jest-e2e.ts","test:e2e:local": "yarn test:e2e --maxWorkers=4",- "test:e2e:watch": "yarn dev:build && jest --runInBand --detectOpenHandles --forceExit --config ./jest-e2e.json --watch",+ "test:e2e:watch": "yarn dev:build && jest --runInBand --detectOpenHandles --forceExit --config ./jest-e2e.ts --watch","prisma": "yarn workspace @calcom/prisma prisma","generate-schemas": "yarn prisma generate && yarn prisma format","copy-swagger-module": "ts-node -r tsconfig-paths/register swagger/copy-swagger-module.ts",