-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
23 lines (22 loc) · 1.01 KB
/
Copy pathvitest.config.ts
File metadata and controls
23 lines (22 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Component (DOM) tests for the simulator page.
//
// `node --test` cannot import or compile a .vue SFC, so the pure modules stay on it
// (timeline / zoom / calendar / ruler / model / policyYaml) and the COMPONENTS run here:
// @vitejs/plugin-vue is what compiles the SFC, @vue/test-utils mounts it, happy-dom gives
// it a DOM.
//
// Scope, stated honestly: happy-dom has NO LAYOUT ENGINE. getBoundingClientRect and
// ResizeObserver are stubs, so these are STATE-TRANSITION tests — given this pointer or key
// sequence and this stubbed geometry, zoom.ts reaches this view and the SVG renders these
// elements. Real layout, real pinch and real overflow are NOT covered here and the cases
// below do not pretend otherwise; Playwright is the escalation if that ever proves to
// matter.
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vitest/config'
export default defineConfig({
plugins: [vue()],
test: {
environment: 'happy-dom',
include: ['docs/.vitepress/theme/components/**/*.spec.ts'],
},
})