[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

test: relocate cli dts fixtures (#9566)

authored by

Hiroshi Ogawa and committed by
GitHub
(Feb 2, 2026, 2:49 PM +0100) 92a60765 7ce3417b

+167 -165
+1 -1
package.json
··· 26 26 "test": "pnpm --filter test-core test:threads", 27 27 "test:ci": "CI=true pnpm -r --reporter-hide-prefix --stream --sequential --filter '@vitest/test-*' --filter !test-browser run test", 28 28 "test:ci:no-bail": "CI=true pnpm -r --no-bail --reporter-hide-prefix --stream --sequential --filter '@vitest/test-*' --filter !test-browser run test", 29 - "test:ci:cache": "CI=true pnpm -r --reporter-hide-prefix --stream --sequential --filter '@vitest/test-*' --filter !test-browser --filter !test-dts-config --filter !test-dts-fixture --filter !test-dts-playwright --filter !test-ui --filter !test-cache run test --experimental.fsModuleCache", 29 + "test:ci:cache": "CI=true pnpm -r --reporter-hide-prefix --stream --sequential --filter '@vitest/test-*' --filter !test-browser --filter '!@vitest/test-integration-dts-*' --filter !test-ui --filter !test-cache run test --experimental.fsModuleCache", 30 30 "test:examples": "CI=true pnpm -r --reporter-hide-prefix --stream --filter '@vitest/example-*' run test", 31 31 "test:ecosystem-ci": "ECOSYSTEM_CI=true pnpm test:ci", 32 32 "typebuild": "tsx ./scripts/explain-types.ts",
+21 -21
pnpm-lock.yaml
··· 1288 1288 specifier: 'catalog:' 1289 1289 version: 8.19.0 1290 1290 1291 + test/cli/dts/browser-playwright: 1292 + devDependencies: 1293 + '@vitest/browser-playwright': 1294 + specifier: workspace:* 1295 + version: link:../../../../packages/browser-playwright 1296 + vitest: 1297 + specifier: workspace:* 1298 + version: link:../../../../packages/vitest 1299 + 1300 + test/cli/dts/config: 1301 + devDependencies: 1302 + vitest: 1303 + specifier: workspace:* 1304 + version: link:../../../../packages/vitest 1305 + 1306 + test/cli/dts/fixture-extend: 1307 + devDependencies: 1308 + vitest: 1309 + specifier: workspace:* 1310 + version: link:../../../../packages/vitest 1311 + 1291 1312 test/config: 1292 1313 devDependencies: 1293 1314 '@test/test-dep-config': ··· 1494 1515 vue: 1495 1516 specifier: 'catalog:' 1496 1517 version: 3.5.27(typescript@5.9.3) 1497 - 1498 - test/dts-config: 1499 - devDependencies: 1500 - vitest: 1501 - specifier: workspace:* 1502 - version: link:../../packages/vitest 1503 - 1504 - test/dts-fixture: 1505 - devDependencies: 1506 - vitest: 1507 - specifier: workspace:* 1508 - version: link:../../packages/vitest 1509 - 1510 - test/dts-playwright: 1511 - devDependencies: 1512 - '@vitest/browser-playwright': 1513 - specifier: workspace:* 1514 - version: link:../../packages/browser-playwright 1515 - vitest: 1516 - specifier: workspace:* 1517 - version: link:../../packages/vitest 1518 1518 1519 1519 test/node-runner: {} 1520 1520
+1
pnpm-workspace.yaml
··· 23 23 - packages/* 24 24 - examples/* 25 25 - test/* 26 + - test/cli/dts/* 26 27 - test/config/fixtures/conditions-pkg 27 28 overrides: 28 29 '@types/node': $@types/node
+1
test/README.md
··· 13 13 ## cli 14 14 15 15 If you are testing a complex interaction, place your tests here. 16 + Type-focused fixtures live under `test/cli/dts/`. 16 17 17 18 ## browser 18 19
-3
test/dts-config/happy-dom-patch.ts
··· 1 - // happy-dom's dts will break `skipLibCheck: false`. 2 - // for now, override happy-dom type for the sake of testing other packages. 3 - export const Window = {} as any
-11
test/dts-config/package.json
··· 1 - { 2 - "name": "@vitest/test-dts-config", 3 - "type": "module", 4 - "private": true, 5 - "scripts": { 6 - "test": "tsc -b" 7 - }, 8 - "devDependencies": { 9 - "vitest": "workspace:*" 10 - } 11 - }
-13
test/dts-config/tsconfig.json
··· 1 - { 2 - "extends": ["./tsconfig.patch.json"], 3 - "compilerOptions": { 4 - "noUncheckedSideEffectImports": true, 5 - "target": "ESNext", 6 - "module": "ESNext", 7 - "moduleResolution": "Bundler", 8 - "types": [], 9 - "strict": true, 10 - "noEmit": true 11 - }, 12 - "include": ["vite.config.ts"] 13 - }
-7
test/dts-config/tsconfig.patch.json
··· 1 - { 2 - "compilerOptions": { 3 - "paths": { 4 - "happy-dom": ["./happy-dom-patch.ts"] 5 - } 6 - } 7 - }
-3
test/dts-config/vite.config.ts
··· 1 - import { defineConfig } from 'vitest/config' 2 - 3 - export default defineConfig({})
-13
test/dts-fixture/package.json
··· 1 - { 2 - "name": "@vitest/test-dts-fixture", 3 - "type": "module", 4 - "private": true, 5 - "scripts": { 6 - "build": "premove dist && tsc -p tsconfig.json", 7 - "check": "tsc -p tsconfig.check.json", 8 - "test": "pnpm build && pnpm check" 9 - }, 10 - "devDependencies": { 11 - "vitest": "workspace:*" 12 - } 13 - }
-13
test/dts-fixture/tsconfig.check.json
··· 1 - { 2 - "extends": ["../dts-config/tsconfig.patch.json"], 3 - "compilerOptions": { 4 - "target": "ESNext", 5 - "module": "NodeNext", 6 - "moduleResolution": "NodeNext", 7 - "types": [], 8 - "strict": true, 9 - "noEmit": true, 10 - "verbatimModuleSyntax": true 11 - }, 12 - "include": ["dist"] 13 - }
-15
test/dts-fixture/tsconfig.json
··· 1 - { 2 - "extends": ["../dts-config/tsconfig.patch.json"], 3 - "compilerOptions": { 4 - "target": "ESNext", 5 - "module": "ESNext", 6 - "moduleResolution": "Bundler", 7 - "strict": true, 8 - "declaration": true, 9 - "declarationMap": true, 10 - "outDir": "dist", 11 - "sourceMap": true, 12 - "verbatimModuleSyntax": true 13 - }, 14 - "include": ["src"] 15 - }
-12
test/dts-playwright/package.json
··· 1 - { 2 - "name": "@vitest/test-dts-playwright", 3 - "type": "module", 4 - "private": true, 5 - "scripts": { 6 - "test": "tsc -b" 7 - }, 8 - "devDependencies": { 9 - "@vitest/browser-playwright": "workspace:*", 10 - "vitest": "workspace:*" 11 - } 12 - }
-11
test/dts-playwright/tsconfig.json
··· 1 - { 2 - "extends": ["../dts-config/tsconfig.patch.json"], 3 - "compilerOptions": { 4 - "target": "ESNext", 5 - "module": "ESNext", 6 - "moduleResolution": "Bundler", 7 - "strict": true, 8 - "noEmit": true 9 - }, 10 - "include": ["src", "*.ts"] 11 - }
-28
test/dts-playwright/vite.config.ts
··· 1 - import { playwright } from '@vitest/browser-playwright' 2 - import { defineConfig } from 'vitest/config' 3 - 4 - export default defineConfig({ 5 - test: { 6 - browser: { 7 - provider: playwright({ 8 - launchOptions: { 9 - timeout: 1234, 10 - // @ts-expect-error test type error 11 - slowMo: 'wrong', 12 - }, 13 - }), 14 - instances: [ 15 - { 16 - browser: 'chromium', 17 - provider: playwright({ 18 - launchOptions: { 19 - timeout: 1234, 20 - // @ts-expect-error test type error 21 - slowMo: 'wrong', 22 - }, 23 - }), 24 - }, 25 - ], 26 - }, 27 - }, 28 - })
-7
test/dts-fixture/src/repro.ts
··· 1 - import { test } from 'vitest' 2 - 3 - export const myTest = test.extend<{ now: number }>({ 4 - now: async ({}, use) => { 5 - await use(Date.now()) 6 - }, 7 - })
-7
test/dts-playwright/src/basic.test.ts
··· 1 - import { test } from 'vitest' 2 - import { page, userEvent } from 'vitest/browser' 3 - 4 - test('basic', async () => { 5 - document.body.innerHTML = `<button>hello</button>` 6 - await userEvent.click(page.getByRole('button'), { force: true }) 7 - })
+3
test/cli/dts/_shared/happy-dom-patch.ts
··· 1 + // happy-dom's dts will break `skipLibCheck: false`. 2 + // for now, override happy-dom type for the sake of testing other packages. 3 + export const Window = {} as any
+7
test/cli/dts/_shared/tsconfig.patch.json
··· 1 + { 2 + "compilerOptions": { 3 + "paths": { 4 + "happy-dom": ["./happy-dom-patch.ts"] 5 + } 6 + } 7 + }
+12
test/cli/dts/browser-playwright/package.json
··· 1 + { 2 + "name": "@vitest/test-integration-dts-browser-playwright", 3 + "type": "module", 4 + "private": true, 5 + "scripts": { 6 + "test": "tsc -b" 7 + }, 8 + "devDependencies": { 9 + "@vitest/browser-playwright": "workspace:*", 10 + "vitest": "workspace:*" 11 + } 12 + }
+11
test/cli/dts/browser-playwright/tsconfig.json
··· 1 + { 2 + "extends": ["../_shared/tsconfig.patch.json"], 3 + "compilerOptions": { 4 + "target": "ESNext", 5 + "module": "ESNext", 6 + "moduleResolution": "Bundler", 7 + "strict": true, 8 + "noEmit": true 9 + }, 10 + "include": ["src", "*.ts"] 11 + }
+28
test/cli/dts/browser-playwright/vite.config.ts
··· 1 + import { playwright } from '@vitest/browser-playwright' 2 + import { defineConfig } from 'vitest/config' 3 + 4 + export default defineConfig({ 5 + test: { 6 + browser: { 7 + provider: playwright({ 8 + launchOptions: { 9 + timeout: 1234, 10 + // @ts-expect-error test type error 11 + slowMo: 'wrong', 12 + }, 13 + }), 14 + instances: [ 15 + { 16 + browser: 'chromium', 17 + provider: playwright({ 18 + launchOptions: { 19 + timeout: 1234, 20 + // @ts-expect-error test type error 21 + slowMo: 'wrong', 22 + }, 23 + }), 24 + }, 25 + ], 26 + }, 27 + }, 28 + })
+11
test/cli/dts/config/package.json
··· 1 + { 2 + "name": "@vitest/test-integration-dts-config", 3 + "type": "module", 4 + "private": true, 5 + "scripts": { 6 + "test": "tsc -b" 7 + }, 8 + "devDependencies": { 9 + "vitest": "workspace:*" 10 + } 11 + }
+13
test/cli/dts/config/tsconfig.json
··· 1 + { 2 + "extends": ["../_shared/tsconfig.patch.json"], 3 + "compilerOptions": { 4 + "noUncheckedSideEffectImports": true, 5 + "target": "ESNext", 6 + "module": "ESNext", 7 + "moduleResolution": "Bundler", 8 + "types": [], 9 + "strict": true, 10 + "noEmit": true 11 + }, 12 + "include": ["vite.config.ts"] 13 + }
+3
test/cli/dts/config/vite.config.ts
··· 1 + import { defineConfig } from 'vitest/config' 2 + 3 + export default defineConfig({})
+13
test/cli/dts/fixture-extend/package.json
··· 1 + { 2 + "name": "@vitest/test-integration-dts-fixture-extend", 3 + "type": "module", 4 + "private": true, 5 + "scripts": { 6 + "build": "premove dist && tsc -p tsconfig.json", 7 + "check": "tsc -p tsconfig.check.json", 8 + "test": "pnpm build && pnpm check" 9 + }, 10 + "devDependencies": { 11 + "vitest": "workspace:*" 12 + } 13 + }
+13
test/cli/dts/fixture-extend/tsconfig.check.json
··· 1 + { 2 + "extends": ["../_shared/tsconfig.patch.json"], 3 + "compilerOptions": { 4 + "target": "ESNext", 5 + "module": "NodeNext", 6 + "moduleResolution": "NodeNext", 7 + "types": [], 8 + "strict": true, 9 + "noEmit": true, 10 + "verbatimModuleSyntax": true 11 + }, 12 + "include": ["dist"] 13 + }
+15
test/cli/dts/fixture-extend/tsconfig.json
··· 1 + { 2 + "extends": ["../_shared/tsconfig.patch.json"], 3 + "compilerOptions": { 4 + "target": "ESNext", 5 + "module": "ESNext", 6 + "moduleResolution": "Bundler", 7 + "strict": true, 8 + "declaration": true, 9 + "declarationMap": true, 10 + "outDir": "dist", 11 + "sourceMap": true, 12 + "verbatimModuleSyntax": true 13 + }, 14 + "include": ["src"] 15 + }
+7
test/cli/dts/browser-playwright/src/basic.test.ts
··· 1 + import { test } from 'vitest' 2 + import { page, userEvent } from 'vitest/browser' 3 + 4 + test('basic', async () => { 5 + document.body.innerHTML = `<button>hello</button>` 6 + await userEvent.click(page.getByRole('button'), { force: true }) 7 + })
+7
test/cli/dts/fixture-extend/src/repro.ts
··· 1 + import { test } from 'vitest' 2 + 3 + export const myTest = test.extend<{ now: number }>({ 4 + now: async ({}, use) => { 5 + await use(Date.now()) 6 + }, 7 + })