Skip to content

Commit

Permalink
fix: added jsdom config for vite test
Browse files Browse the repository at this point in the history
  • Loading branch information
freemanzMrojo committed Nov 22, 2024
1 parent 0e61a05 commit 1508be4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/sdk-vite-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview",
"test": "vitest"
"test": "vitest --config vitest.node.config.js",
"test:jsdom": "vitest --config vitest.jsdom.config.js"
},
"dependencies": {
"@vechain/sdk-core": "1.0.0-rc.3",
Expand Down
2 changes: 1 addition & 1 deletion apps/sdk-vite-integration/tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"root":["./vite.config.ts","./vitest.config.ts","./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/components/getlastblock.tsx","./src/components/hash.tsx","./src/components/transferlogs.tsx","./src/const/const.tsx","./src/const/index.tsx","./src/types/index.tsx","./src/types/types.d.tsx","./tests/hash.spec.tsx"],"version":"5.6.3"}
{"root":["./vite.config.ts","./vitest.node.config.ts","./vitest.jsdom.config.ts","./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/components/getlastblock.tsx","./src/components/hash.tsx","./src/components/transferlogs.tsx","./src/const/const.tsx","./src/const/index.tsx","./src/types/index.tsx","./src/types/types.d.tsx","./tests/hash.spec.tsx"],"version":"5.6.3"}
14 changes: 14 additions & 0 deletions apps/sdk-vite-integration/vitest.jsdom.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig, ViteUserConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'

export default defineConfig({
plugins: [react()] as ViteUserConfig["plugins"],
test: {
environment: 'jsdom',
browser: {
enabled: true,
name: 'chromium',
provider: 'playwright',
},
},
})
File renamed without changes.

0 comments on commit 1508be4

Please sign in to comment.