From fac881d61176f04a4062db710df98924a76b0ffb Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Sun, 18 Dec 2022 20:26:07 +1100 Subject: 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 --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'package.json') diff --git a/package.json b/package.json index abcc393..a109c09 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "dev": "vite", "build": "vue-tsc --noEmit && vite build", "preview": "vite preview", - "tsc": "vue-tsc --noEmit" + "tsc": "vue-tsc --noEmit", + "test": "vitest" }, "author": "Terry Truong", "license": "MIT", @@ -17,17 +18,20 @@ "vue": "^3.2.37" }, "devDependencies": { + "@testing-library/vue": "^6.6.1", "@typescript-eslint/eslint-plugin": "^5.39.0", "@typescript-eslint/parser": "^5.39.0", "@vitejs/plugin-vue": "^3.1.0", "autoprefixer": "^10.4.12", "eslint": "^8.24.0", "eslint-plugin-vue": "^9.6.0", + "happy-dom": "^8.1.0", "postcss": "^8.4.17", "smartcrop-cli": "^2.0.3", "tailwindcss": "^3.1.8", "typescript": "^4.6.4", "vite": "^3.1.0", + "vitest": "^0.25.8", "vue-tsc": "^0.40.4" } } -- cgit v1.2.3