Merged in chore/upgrade-vitest4 (pull request #3253)

chore: upgrade to vitest@4

* chore: upgrade to vitest@4


Approved-by: Anton Gunnarsson
This commit is contained in:
Joakim Jäderberg
2025-12-01 12:41:12 +00:00
parent 3ec78b4fab
commit f5dd6740d0
13 changed files with 241 additions and 191 deletions

View File

@@ -1,5 +1,6 @@
import { defineConfig, mergeConfig } from 'vitest/config'
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin'
import { playwright } from '@vitest/browser-playwright'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
@@ -13,8 +14,12 @@ import viteConfig from './vite.config'
const isCI = process.env.CI === 'true'
const browserInstances = isCI
? [{ browser: 'chromium' }]
: [{ browser: 'chromium' }, { browser: 'firefox' }, { browser: 'webkit' }]
? [{ browser: 'chromium' as const }]
: [
{ browser: 'chromium' as const },
{ browser: 'firefox' as const },
{ browser: 'webkit' as const },
]
export default mergeConfig(
viteConfig,
@@ -43,7 +48,7 @@ export default mergeConfig(
browser: {
enabled: true,
// Make sure to install Playwright
provider: 'playwright',
provider: playwright(),
headless: true,
instances: browserInstances,
},