Skip to content

Commit

Permalink
feat: add a test:seq command (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefl authored Oct 25, 2024
1 parent 44ca5f6 commit d04d456
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 61 deletions.
1 change: 1 addition & 0 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"start": "next start",
"type-check": "tsc --noEmit",
"test": "pnpm with-env jest --colors --config jest.config.js",
"test:seq": "pnpm with-env jest --colors --config jest.config.js --verbose --runInBand --no-cache",
"test-e2e": "pnpm with-env playwright test",
"test-e2e-ui": "pnpm with-env playwright test --ui",
"test-e2e-ui-serve": "pnpm build && pnpm start --port 4848 --turbo",
Expand Down
45 changes: 1 addition & 44 deletions apps/nextjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,3 @@
// {
// "extends": "../../tsconfig.json",
// "exclude": ["node_modules"],
// "include": [
// "next-env.d.ts",
// "**/*.ts",
// "**/*.tsx",
// "**/*.cjs",
// "**/*.mjs",
// ".next/types/**/*.ts"
// ],
// "compilerOptions": {
// "baseUrl": "./src",
// "allowJs": true,
// "skipLibCheck": true,
// "strict": true,
// "forceConsistentCasingInFileNames": true,
// "noEmit": true,
// "incremental": true,
// "esModuleInterop": true,
// "module": "esnext",
// "moduleResolution": "node",
// "resolveJsonModule": true,
// "isolatedModules": true,
// "noImplicitAny": false,
// "jsx": "preserve",
// "paths": {
// "@/components/*": ["components/*"],
// "@/app/*": ["app/*"],
// "@/lib/*": ["lib/*"],
// "@/utils/*": ["utils/*"],
// "@/assets/*": ["assets/*"]
// },
// "plugins": [
// {
// "name": "next"
// }
// ],
// "strictNullChecks": true
// }
// }

{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
Expand Down Expand Up @@ -70,8 +28,7 @@
"name": "next"
}
],
"strictNullChecks": true,
"types": ["jest", "node", "@testing-library/jest-dom", "@storybook/react"]
"strictNullChecks": true
},
"include": [
"next-env.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion apps/nextjs/tsconfig.storybook.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@/assets/*": ["assets/*"],
"next/*": ["mocks/next/*"],
"@clerk/*": ["mocks/clerk/*"]
}
},
"types": ["jest", "node", "@testing-library/jest-dom", "@storybook/react"]
}
}
3 changes: 2 additions & 1 deletion apps/nextjs/tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"lib": ["esnext", "dom"],
"lib": ["dom", "esnext"],
"outDir": "./dist-tests",
"rootDir": "./src",
"strict": true,
Expand All @@ -12,6 +12,7 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"incremental": true,
"noEmit": true,
"types": ["jest", "node", "@testing-library/jest-dom", "@storybook/react"],
"baseUrl": "./src",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"type-check": "turbo type-check",
"node-version": "node -v",
"with-env": "dotenv -e ../../.env --",
"test": "turbo test --",
"test": "turbo test -- --maxWorkers=33%",
"test:seq": "turbo test:seq --concurrency=1 --",
"test-e2e": "turbo test-e2e --",
"test-e2e-ui": "turbo test-e2e-ui --",
"storybook": "turbo storybook"
Expand Down
1 change: 1 addition & 0 deletions packages/aila/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit",
"test": "pnpm with-env jest --colors --config jest.config.js",
"test:seq": "pnpm with-env jest --colors --config jest.config.js --verbose --runInBand",
"test-file": "pnpm with-env jest --config jest.config.js --runTestsByPath TEST_FILEPATH",
"with-env": "dotenv -e ../../.env --"
},
Expand Down
5 changes: 0 additions & 5 deletions packages/aila/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
"../core/src/utils/subjects/index.ts"
],
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"esModuleInterop": true,
"types": ["jest"],
"typeRoots": [
"./../../node_modules/@types",
"./src/types",
Expand Down
5 changes: 3 additions & 2 deletions packages/aila/tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"lib": ["esnext", "dom"],
"lib": ["esnext"],
"outDir": "./dist-tests",
"rootDir": "./src",
"strict": true,
Expand All @@ -12,8 +12,9 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"incremental": true,
"noEmit": true,
"types": ["jest", "node", "@testing-library/jest-dom"],
"types": ["jest", "node"],
"typeRoots": [
"./../../node_modules/@types",
"./src/types",
Expand Down
1 change: 1 addition & 0 deletions packages/ingest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"ingest": "pnpm with-env ts-node --compiler-options {\\\"module\\\":\\\"CommonJS\\\"} ./src/index.ts",
"with-env": "dotenv -e ../../.env --",
"test": "pnpm with-env jest --colors --config jest.config.js",
"test:seq": "pnpm with-env jest --colors --config jest.config.js --verbose --runInBand",
"test-file": "pnpm with-env jest --config jest.config.js --runTestsByPath TEST_FILEPATH"
},
"prettier": "@oakai/prettier-config",
Expand Down
5 changes: 3 additions & 2 deletions packages/ingest/tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"lib": ["esnext", "dom"],
"lib": ["dom", "esnext"],
"outDir": "./dist-tests",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"incremental": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"types": ["jest", "node", "@testing-library/jest-dom"],
"types": ["jest", "node"],
"paths": {
"@/*": ["./src/*"]
}
Expand Down
4 changes: 1 addition & 3 deletions tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"compilerOptions": {
"noEmitOnError": true,
"outDir": "./build/tests",
"module": "esnext",
"target": "esnext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"lib": ["esnext"],
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
Expand Down
6 changes: 4 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@
"cache": false
},
"test": {
"cache": false,
"outputs": ["packages/aila/**/*.spec.js", "packages/aila/**/*.test.js"]
"cache": false
},
"test:seq": {
"cache": false
},
"test-e2e": {
"cache": false,
Expand Down

0 comments on commit d04d456

Please sign in to comment.