Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
Something went wrong. Try again.
TypeScript
123456789101112131415161718192021222324252627282930313233343536373839404142434445import { expect, test } from 'vitest'import { runInlineTests } from '../../test-utils'
test('oxc config on browser', async () => { const result = await runInlineTests({ // needs a config file to reproduce // https://github.com/vitest-dev/vitest/issues/9800 'vitest.config.ts': `import { playwright } from '@vitest/browser-playwright'import { defineConfig } from 'vite'
export default defineConfig({ test: { browser: { enabled: true, headless: true, provider: playwright(), instances: [ { browser: 'chromium' }, ], }, }, oxc: { jsx: { refresh: false, } }})`, 'basic.test.ts': `import { test } from "vitest";test('basic', () => {});`, })
expect(result.stderr).toMatchInlineSnapshot(`""`) expect(result.errorTree()).toMatchInlineSnapshot(` { "basic.test.ts": { "basic": "passed", }, } `)})