Browse Source

add vitest and testing-library

main
Yanick Champoux 10 months ago
parent
commit
8d99a63648
  1. 6
      package.json
  2. 9
      vitest.config.js

6
package.json

@ -18,6 +18,8 @@ @@ -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 @@ @@ -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

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