1
0
mirror of https://github.com/koloml/furbooru-tagging-assistant.git synced 2025-12-23 14:52:59 +00:00

Installing vitest with jsdom, setting up configuration

This commit is contained in:
2025-02-20 22:16:28 +04:00
parent f7dff0968e
commit ab5a6daa07
4 changed files with 1871 additions and 8 deletions

3
.gitignore vendored
View File

@@ -2,10 +2,11 @@
.DS_Store
node_modules
/build
/coverage
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
vite.config.ts.timestamp-*

1853
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,9 @@
"build:popup": "vite build",
"build:extension": "node build-extension.js",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test": "vitest run --coverage",
"test:watch": "vitest watch --coverage"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^4.0.0",
@@ -15,12 +17,15 @@
"@sveltejs/kit": "^2.17.2",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@types/chrome": "^0.0.304",
"@vitest/coverage-v8": "^3.0.6",
"cheerio": "^1.0.0",
"jsdom": "^26.0.0",
"sass": "^1.85.0",
"svelte": "^5.20.1",
"svelte-check": "^4.1.4",
"typescript": "^5.7.3",
"vite": "^6.1.0"
"vite": "^6.1.0",
"vitest": "^3.0.6"
},
"type": "module",
"dependencies": {

View File

@@ -1,5 +1,5 @@
import {sveltekit} from '@sveltejs/kit/vite';
import {defineConfig} from 'vite';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
export default defineConfig({
build: {
@@ -9,4 +9,14 @@ export default defineConfig({
plugins: [
sveltekit(),
],
test: {
globals: true,
environment: 'jsdom',
include: ['src/**/*.{js,ts}'],
exclude: ['**/node_modules/**', '.*\\.d\\.ts$', '.*\\.spec\\.ts$'],
coverage: {
reporter: ['text', 'html'],
include: ['src/**/*.{js,ts}'],
}
}
});