8000 chore: use vitest workspaces for tests (#32121) · nuxt/nuxt@c65550c · GitHub
[go: up one dir, main page]

Skip to content

Commit c65550c

Browse files
authored
chore: use vitest workspaces for tests (#32121)
1 parent 9c45060 commit c65550c

File tree

6 files changed

+118
-113
lines changed

6 files changed

+118
-113
lines changed

.github/workflows/autofix.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,8 @@ jobs:
2929
- name: Build (stub)
3030
run: pnpm dev:prepare
3131

32-
- name: Test (unit)
33-
run: pnpm test:unit -u
34-
35-
- name: Test (runtime unit)
36-
run: pnpm test:runtime -u
32+
- name: Test (unit + runtime)
33+
run: pnpm vitest run --project unit --project nuxt -u
3734

3835
- name: Run build
3936
run: pnpm build

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,8 @@ jobs:
185185
- name: Build (stub)
186186
run: pnpm dev:prepare
187187

188-
- name: Test (unit)
189-
run: pnpm test:unit
190-
191-
- name: Test (runtime unit)
192-
run: pnpm test:runtime
188+
- name: Test (unit + runtime test)
189+
run: pnpm vitest run --project unit --project nuxt
193190

194191
test-size:
195192
runs-on: ubuntu-latest

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
"play:build": "nuxi build playground",
2525
"play:generate": "nuxi generate playground",
2626
"play:preview": "nuxi preview playground",
27-
"test": "pnpm test:fixtures && pnpm test:fixtures:dev && pnpm test:fixtures:webpack && pnpm test:unit && pnpm test:runtime && pnpm test:types && pnpm typecheck",
27+
"test": "pnpm test:prepare && vitest run && pnpm test:fixtures:dev && pnpm test:fixtures:webpack && pnpm test:types && pnpm typecheck",
2828
"test:prepare": "jiti ./test/prepare.ts",
29-
"test:fixtures": "pnpm test:prepare && vitest run --dir test",
29+
"test:fixtures": "pnpm test:prepare && vitest run --project fixtures",
3030
"test:fixtures:dev": "TEST_ENV=dev pnpm test:fixtures",
3131
"test:fixtures:webpack": "TEST_BUILDER=webpack pnpm test:fixtures",
32-
"test:runtime": "vitest -c vitest.nuxt.config.ts",
32+
"test:runtime": "vitest run --project nuxt",
3333
"test:types": "pnpm --filter './test/fixtures/**' test:types",
34-
"test:unit": "vitest run packages/",
34+
"test:unit": "vitest run --project unit",
3535
"test:attw": "pnpm --filter './packages/**' test:attw",
3636
"test:e2e": "playwright test",
3737
"test:e2e:debug": "playwright test --debug",
@@ -77,12 +77,13 @@
7777
"@arethetypeswrong/cli": "0.18.1",
7878
"@babel/core": "7.27.1",
7979
"@babel/helper-plugin-utils": "7.27.1",
80+
"@codspeed/core": "^4.0.1",
8081
"@codspeed/vitest-plugin": "4.0.1",
8182
"@nuxt/cli": "3.25.1",
8283
"@nuxt/eslint-config": "1.3.1",
8384
"@nuxt/kit": "workspace:*",
8485
"@nuxt/rspack-builder": "workspace:*",
85-
"@nuxt/test-utils": "3.18.0",
86+
"@nuxt/test-utils": "3.19.0",
8687
"@nuxt/webpack-builder": "workspace:*",
8788
"@playwright/test": "1.52.0",
8889
"@rspack/core": "1.3.9",

pnpm-lock.yaml

Lines changed: 34 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0