mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor(curriculum): use projects for curriculum tests (#64657)
This commit is contained in:
committed by
GitHub
parent
1eebe23fd6
commit
f79d99d272
@@ -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",
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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']
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user