Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ pnpm lint
# Run Vitest
pnpm test
pnpm test:watch
pnpm test --project nuxt
pnpm test --project types

# Release new version
pnpm release
Expand Down
File renamed without changes.
25 changes: 22 additions & 3 deletions playground/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
import { defineVitestConfig } from '@nuxt/test-utils/config'
import { defineVitestProject } from '@nuxt/test-utils/config'
import { defineConfig } from 'vitest/config'

export default defineVitestConfig({
// https://nuxt.com/docs/4.x/getting-started/testing#setup
export default defineConfig({
test: {
environment: 'nuxt',
projects: [
await defineVitestProject({
test: {
name: 'nuxt',
environment: 'nuxt',
},
}),
{
test: {
name: 'types',
include: ['tests/**/*.spec-d.ts'],
typecheck: {
enabled: true,
only: true,
},
},
},
],
},
})