test: scaffold component testing with Vitest

This commit is contained in:
Eric Liu 2024-11-23 10:53:14 -08:00
commit 8b477b12f9
9 changed files with 2324 additions and 39 deletions

View file

@ -30,6 +30,8 @@
"css/*.css"
],
"scripts": {
"test": "vitest",
"test:ui": "vite",
"test:src-types": "tsc types/**/*.ts",
"test:types": "svelte-check --workspace tests",
"lint": "prettier --write \"**/*.{svelte,md,js,json,ts}\"",
@ -43,9 +45,15 @@
"flatpickr": "4.6.9"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/svelte": "^5.2.6",
"@testing-library/user-event": "^14.5.2",
"autoprefixer": "^10.4.8",
"carbon-components": "10.58.12",
"carbon-icons-svelte": "^12.1.0",
"carbon-preprocess-svelte": "^0.11.7",
"jsdom": "^25.0.1",
"postcss": "^8.4.16",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.8",
@ -55,7 +63,8 @@
"svelte": "^4.2.10",
"svelte-check": "^4.0.6",
"tinyglobby": "^0.2.10",
"typescript": "^5.6.3"
"typescript": "^5.6.3",
"vitest": "^2.1.5"
},
"standard-version": {
"skip": {