test: add initial component tests (#923)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Juho Rutila
2023-11-17 11:49:43 +02:00
committed by GitHub
parent b666c4a1a8
commit bcc46b87f5
11 changed files with 603 additions and 62 deletions

View File

@@ -1,8 +1,16 @@
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import { fileURLToPath } from 'node:url'
import { defineVitestConfig } from 'nuxt-vitest/config'
export default defineConfig({
export default defineVitestConfig({
test: {
testTimeout: 20000
testTimeout: 20000,
globals: true,
environment: 'nuxt',
environmentOptions: {
nuxt: {
rootDir: fileURLToPath(new URL('test/nuxt/', import.meta.url))
}
}
}
})