add vitest and testing-library

This commit is contained in:
Yanick Champoux 2022-04-17 12:21:50 -04:00
parent d6432c05a6
commit 8d99a63648
2 changed files with 14 additions and 1 deletions

View File

@ -18,6 +18,8 @@
"@sveltejs/adapter-static": "^1.0.0-next.28",
"@sveltejs/kit": "^1.0.0-next.288",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.38",
"@testing-library/svelte": "^3.1.1",
"@testing-library/user-event": "^13.5.0",
"eslint": "^8.10.0",
"eslint-config-prettier": "^8.4.0",
"eslint-plugin-svelte3": "^3.4.1",
@ -25,7 +27,9 @@
"prettier-plugin-svelte": "^2.6.0",
"standard-version": "^9.3.2",
"storybook-builder-vite": "0.1.21",
"svelte": "^3.46.4"
"svelte": "^3.46.4",
"vitest": "^0.9.3",
"vitest-svelte-kit": "^0.0.6"
},
"dependencies": {
"@storybook/addon-essentials": "^6.4.19",

9
vitest.config.js Normal file
View File

@ -0,0 +1,9 @@
import { extractFromSvelteConfig } from "vitest-svelte-kit";
export default extractFromSvelteConfig().then((config) => ({
...config,
test: {
globals: true,
environment: "jsdom",
},
}));