refactor(curriculum): use projects for curriculum tests (#64657)

This commit is contained in:
Oliver Eyton-Williams
2026-01-13 16:56:25 +01:00
committed by GitHub
parent 1eebe23fd6
commit f79d99d272
5 changed files with 17 additions and 7 deletions
+4 -1
View File
@@ -38,8 +38,11 @@
"reorder-tasks": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/reorder-tasks",
"update-challenge-order": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/update-challenge-order",
"update-step-titles": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/update-step-titles",
"test": "NODE_OPTIONS='--max-old-space-size=7168' pnpm test-gen && vitest run",
"test:watch": "pnpm test-gen && vitest",
"test-gen": "tsx ./src/test/utils/generate-block-tests.ts",
"test": "NODE_OPTIONS='--max-old-space-size=7168' pnpm -s test-gen && vitest -c src/test/vitest.config.mjs"
"test-tooling": "pnpm test --project @freecodecamp/curriculum",
"test-content": "pnpm test --project test"
},
"devDependencies": {
"@babel/core": "7.23.7",
+3 -3
View File
@@ -2,12 +2,12 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
include: ['src/test/blocks-generated/**/*.test.js'],
include: ['blocks-generated/**/*.test.js'],
environment: 'node',
hookTimeout: 60000,
testTimeout: 30000,
isolate: false,
globalSetup: 'src/test/vitest-global-setup.mjs',
setupFiles: 'src/test/vitest-setup.mjs'
globalSetup: 'vitest-global-setup.mjs',
setupFiles: 'vitest-setup.mjs'
}
});
+1 -1
View File
@@ -2,6 +2,6 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
exclude: ['src/test/blocks-generated/**/*.test.js', 'dist']
projects: ['vitest.tooling.config.mjs', 'src/test/vitest.config.mjs']
}
});
+7
View File
@@ -0,0 +1,7 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
exclude: ['src/test/blocks-generated/**/*.test.js', 'dist', 'node_modules']
}
});
+2 -2
View File
@@ -74,8 +74,8 @@
"test:tools:challenge-helper-scripts": "cd ./tools/challenge-helper-scripts && pnpm test run",
"test:tools:scripts-lint": "cd ./tools/scripts/lint && pnpm test run",
"test:tools:challenge-parser": "cd ./tools/challenge-parser && pnpm test run",
"test:curriculum:content": "cd ./curriculum && pnpm test run",
"test:curriculum:tooling": "cd ./curriculum && pnpm vitest run",
"test:curriculum:content": "cd ./curriculum && pnpm test-content",
"test:curriculum:tooling": "cd ./curriculum && pnpm test-tooling",
"test:shared": "cd ./shared && pnpm vitest run",
"test:client": "cd ./client && pnpm test run",
"prepare": "husky",