Skip to content

Commit

Permalink
update test to latest vite, but something is wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
ildella committed Nov 11, 2024
1 parent 89d6ace commit d33bd71
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/default-renderers.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import '@testing-library/jest-dom/extend-expect'
import { describe, test, expect } from 'vitest'
import { render, screen } from '@testing-library/svelte'
// import '@testing-library/jest-dom/extend-expect'
// import '@testing-library/jest-dom/vitest'

import SvelteMarkdown from '../src/SvelteMarkdown.svelte'

describe('testing default renderers', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/svelte-markdown.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '@testing-library/jest-dom/extend-expect'
import { describe, test, expect } from 'vitest'
import { render, screen } from '@testing-library/svelte'

import SvelteMarkdown from '../src/SvelteMarkdown.svelte'

describe('testing initialization', () => {
Expand Down
2 changes: 2 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { svelte } from '@sveltejs/vite-plugin-svelte'
// import analyze from 'rollup-plugin-analyzer'
// import { terser } from 'rollup-plugin-terser'
// import filesize from 'rollup-plugin-filesize'

import pkg from './package.json'

// const production = !process.argv.includes('--watch')
Expand All @@ -14,6 +15,7 @@ export default defineConfig({
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./vitest-setup.js'],
},
build: {
rollupOptions: {
Expand Down
1 change: 1 addition & 0 deletions vitest-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom/vitest'

0 comments on commit d33bd71

Please sign in to comment.