Initial
This commit is contained in:
commit
b43955e0d9
162 changed files with 15425 additions and 0 deletions
28
vitest.config.ts
Normal file
28
vitest.config.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { defineConfig } from 'vitest/config';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const r = (p: string) => fileURLToPath(new URL(p, import.meta.url));
|
||||
|
||||
// Unit tests target the pure layers (domain/state/api/auth). We resolve the
|
||||
// project's `$` aliases here directly rather than pulling in the full SvelteKit
|
||||
// Vite plugin — `$app/*` runtime imports are mocked per-test with vi.mock().
|
||||
export default defineConfig({
|
||||
test: {
|
||||
environment: 'happy-dom',
|
||||
globals: true,
|
||||
include: ['tests/unit/**/*.test.ts']
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
$domain: r('./src/lib/domain'),
|
||||
$state: r('./src/lib/state'),
|
||||
$api: r('./src/lib/api'),
|
||||
$auth: r('./src/lib/auth'),
|
||||
$map: r('./src/lib/map'),
|
||||
$ui: r('./src/lib/ui'),
|
||||
$i18n: r('./src/lib/i18n'),
|
||||
$features: r('./src/lib/features'),
|
||||
'$app/navigation': r('./tests/stubs/app-navigation.ts')
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue