aboutsummaryrefslogtreecommitdiff
path: root/vite.config.ts
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-12-18 20:26:07 +1100
committerTerry Truong <terry06890@gmail.com>2022-12-18 20:26:07 +1100
commitfac881d61176f04a4062db710df98924a76b0ffb (patch)
tree6c55c0f100668888a31dc54daa24d9d794bdba76 /vite.config.ts
parent83366605d1bd43c245c4c110fadfd1a6fd05d3c2 (diff)
Add unit testing
Install vitest, happy-dom, and @testing-library/vue Add lib.ts and rbtree.ts tests in tests/ Modularise some date-range-managing code from App.vue into lib.ts
Diffstat (limited to 'vite.config.ts')
-rw-r--r--vite.config.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/vite.config.ts b/vite.config.ts
index 6baaeb0..729378a 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,3 +1,4 @@
+/// <reference types="vitest" />
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
@@ -14,4 +15,8 @@ export default defineConfig({
build: {
sourcemap: true,
},
+ test: {
+ globals: true,
+ environment: 'happy-dom',
+ },
})