diff --git a/client/package.json b/client/package.json index a0c503634f3..64bc1741e83 100644 --- a/client/package.json +++ b/client/package.json @@ -21,7 +21,7 @@ "scripts": { "prebuild": "pnpm run common-setup && pnpm run build:scripts --env production", "build": "NODE_OPTIONS=\"--max-old-space-size=7168 --no-deprecation\" gatsby build --prefix-paths", - "build:scripts": "pnpm run -F=browser-scripts build", + "build:scripts": "pnpm run -F=browser-scripts compile", "build:external-curriculum": "tsx ./tools/external-curriculum/build", "clean": "gatsby clean", "common-setup": "pnpm -w turbo compile && pnpm run create:env && pnpm run create:trending && pnpm run create:search-placeholder", @@ -35,7 +35,9 @@ "serve-ci": "serve -l 8000 -c serve.json public", "prestand-alone": "pnpm run prebuild", "stand-alone": "gatsby develop", - "test": "vitest", + "test": "vitest run", + "test:watch": "vitest", + "test:ui": "vitest --ui", "type-check": "tsc --noEmit" }, "dependencies": { diff --git a/package.json b/package.json index e65dbea6398..8b6c8ddb03a 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "analyze-bundle": "webpack-bundle-analyzer", "prebuild": "turbo compile", "build": "npm-run-all -p build:*", - "build-workers": "cd ./client && pnpm run prebuild", "build:client": "cd ./client && pnpm run build", "build:curriculum": "pnpm -F=curriculum run build && pnpm -F=client run build:external-curriculum", "build:api": "cd ./api && pnpm run build", @@ -67,15 +66,7 @@ "serve:client": "cd ./client && pnpm run serve", "serve:client-ci": "cd ./client && pnpm run serve-ci", "start": "turbo compile && npm-run-all -p develop:server serve:client", - "test": "turbo compile && NODE_OPTIONS='--max-old-space-size=7168' run-s build:curriculum build-workers test:**", - "test:api": "cd api && pnpm test", - "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-content", - "test:curriculum:tooling": "cd ./curriculum && pnpm test-tooling", - "test:shared": "cd ./packages/shared && pnpm vitest run", - "test:client": "cd ./client && pnpm test run", + "test": "turbo test", "prepare": "husky", "playwright:run": "pnpm -F e2e run playwright:run", "playwright:watch": "pnpm -F e2e run playwright:watch" diff --git a/packages/shared/package.json b/packages/shared/package.json index bd412bd99c0..1b37ba712a5 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -10,7 +10,9 @@ "pnpm": ">=10" }, "scripts": { - "test": "vitest", + "test": "vitest run", + "test:watch": "vitest", + "test:ui": "vitest --ui", "type-check": "tsc --noEmit", "compile": "tsdown --format cjs --format esm", "lint": "eslint --max-warnings 0" diff --git a/tools/challenge-editor/client/package.json b/tools/challenge-editor/client/package.json index 1aea94e929c..454eb5581be 100644 --- a/tools/challenge-editor/client/package.json +++ b/tools/challenge-editor/client/package.json @@ -14,7 +14,6 @@ "start": "PORT=3300 vite", "build": "tsc && vite build", "lint": "eslint --max-warnings 0", - "test": "echo \"no tests here yet\"", "type-check": "tsc --noEmit", "postinstall": "shx cp ./sample.env ./.env" }, diff --git a/tools/challenge-helper-scripts/package.json b/tools/challenge-helper-scripts/package.json index 58b3681c41c..aaac188ef18 100644 --- a/tools/challenge-helper-scripts/package.json +++ b/tools/challenge-helper-scripts/package.json @@ -25,7 +25,9 @@ "create-quiz": "tsx create-quiz", "rename-block": "tsx rename-block", "lint": "eslint --max-warnings 0", - "test": "vitest", + "test": "vitest run", + "test:watch": "vitest", + "test:ui": "vitest --ui", "type-check": "tsc --noEmit" }, "devDependencies": { diff --git a/tools/challenge-parser/package.json b/tools/challenge-parser/package.json index a7f447c331e..1889838df71 100644 --- a/tools/challenge-parser/package.json +++ b/tools/challenge-parser/package.json @@ -20,7 +20,9 @@ "main": "index.js", "scripts": { "lint": "eslint --max-warnings 0", - "test": "vitest", + "test": "vitest run", + "test:watch": "vitest", + "test:ui": "vitest --ui", "type-check": "tsc --noEmit" }, "dependencies": { diff --git a/tools/client-plugins/browser-scripts/package.json b/tools/client-plugins/browser-scripts/package.json index f28a6a3151c..06ff1abe596 100644 --- a/tools/client-plugins/browser-scripts/package.json +++ b/tools/client-plugins/browser-scripts/package.json @@ -19,9 +19,8 @@ "author": "freeCodeCamp ", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", "lint": "eslint --max-warnings 0", - "build": "NODE_OPTIONS=\"--max-old-space-size=7168\" webpack -c webpack.config.cjs" + "compile": "NODE_OPTIONS=\"--max-old-space-size=7168\" webpack -c webpack.config.cjs" }, "type": "module", "keywords": [], diff --git a/tools/scripts/lint/package.json b/tools/scripts/lint/package.json index 51098921219..c8ba6608d12 100644 --- a/tools/scripts/lint/package.json +++ b/tools/scripts/lint/package.json @@ -16,7 +16,9 @@ "author": "freeCodeCamp ", "scripts": { "lint": "eslint --max-warnings 0", - "test": "vitest" + "test": "vitest run", + "test:watch": "vitest", + "test:ui": "vitest --ui" }, "devDependencies": { "@freecodecamp/eslint-config": "workspace:*", diff --git a/turbo.json b/turbo.json index f87e297457c..3e2b85ef950 100644 --- a/turbo.json +++ b/turbo.json @@ -38,6 +38,16 @@ "create:trending": { "cache": false }, "create:env": { "dependsOn": ["@freecodecamp/curriculum#compile"] }, "build": { "dependsOn": ["compile"] }, - "build:scripts": {} + "build:scripts": {}, + "build:external-curriculum": { + "dependsOn": ["@freecodecamp/curriculum#build"] + }, + "test": { "dependsOn": ["compile"] }, + "@freecodecamp/api#test": { + "dependsOn": ["compile", "@freecodecamp/curriculum#build"] + }, + "@freecodecamp/client#test": { + "dependsOn": ["compile", "create:env", "build:external-curriculum"] + } } }