chore: Fix unit test

This commit is contained in:
Sidharth Vinod
2024-11-08 21:42:57 +05:30
parent 118f03385e
commit 09616ed156
5 changed files with 359 additions and 738 deletions

View File

@@ -27,14 +27,15 @@
"@sveltejs/adapter-static": "3.0.6",
"@sveltejs/kit": "2.8.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@testing-library/svelte": "4.2.3",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/svelte": "^5.2.4",
"@types/dompurify": "^3.0.5",
"@types/lodash-es": "^4.17.12",
"@types/pako": "2.0.3",
"@types/uuid": "9.0.8",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"@vitest/ui": "^1.1.3",
"@vitest/ui": "^2.1.4",
"autoprefixer": "^10.4.14",
"c8": "7.14.0",
"chai": "^4.3.7",
@@ -53,7 +54,7 @@
"eslint-plugin-vitest": "^0.5.0",
"esserializer": "^1.3.11",
"husky": "^8.0.3",
"jsdom": "^21.1.2",
"jsdom": "^25.0.1",
"lint-staged": "^15.2.0",
"node-html-parser": "^6.1.5",
"postcss": "^8.4.33",
@@ -67,7 +68,7 @@
"tslib": "^2.6.2",
"typescript": "^5.5.0",
"vite": "^5.4.4",
"vitest": "^1.1.3",
"vitest": "^2.1.4",
"vitest-dom": "^0.1.1"
},
"dependencies": {

View File

@@ -1,5 +1,5 @@
import { cleanup, render } from '@testing-library/svelte';
import { describe, expect, it, afterEach } from 'vitest';
import { afterEach, describe, expect, it } from 'vitest';
import Card from './Card.svelte';
describe('card.svelte', () => {

View File

@@ -1,5 +1,6 @@
import 'vitest-dom/extend-expect';
import '@testing-library/jest-dom/vitest';
import { beforeAll, vi } from 'vitest';
import 'vitest-dom/extend-expect';
// TODO: Remove once https://github.com/sveltejs/kit/issues/6259 is closed.
beforeAll(() => {

View File

@@ -1,8 +1,9 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { svelteTesting } from '@testing-library/svelte/vite';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [sveltekit()],
plugins: [sveltekit(), svelteTesting()],
envPrefix: 'MERMAID_',
optimizeDeps: { include: ['mermaid'] },
server: {

1080
yarn.lock

File diff suppressed because it is too large Load Diff