feat: add initial e2e tests

This commit is contained in:
2026-02-03 20:57:29 +01:00
parent 91492c0696
commit 731a9683e7
22 changed files with 776 additions and 90 deletions

View File

@@ -1,9 +1,10 @@
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
import { playwright } from '@vitest/browser-playwright';
import comlink from 'vite-plugin-comlink';
import glsl from 'vite-plugin-glsl';
import wasm from 'vite-plugin-wasm';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [
@@ -20,5 +21,36 @@ export default defineConfig({
},
ssr: {
noExternal: ['three']
},
build: {
chunkSizeWarningLimit: 2000
},
test: {
expect: { requireAssertions: true },
projects: [
{
extends: './vite.config.ts',
test: {
name: 'client',
browser: {
enabled: true,
provider: playwright(),
instances: [{ browser: 'firefox', headless: true }]
},
include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
exclude: ['src/lib/server/**']
}
},
{
extends: './vite.config.ts',
test: {
name: 'server',
environment: 'node',
include: ['src/**/*.{test,spec}.{js,ts}'],
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}']
}
}
]
}
});