mirror of
https://github.com/hanzoai/vitest.git
synced 2026-09-24 17:04:25 +00:00
27 lines
619 B
TypeScript
27 lines
619 B
TypeScript
import path from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { defineConfig } from 'vitest/config'
|
|
import { instances, provider } from '../../settings'
|
|
|
|
export default defineConfig({
|
|
cacheDir: path.join(
|
|
path.dirname(fileURLToPath(import.meta.url)),
|
|
'node_modules/.vite'
|
|
),
|
|
test: {
|
|
browser: {
|
|
enabled: true,
|
|
provider,
|
|
instances: [instances[0]],
|
|
orchestratorScripts: [
|
|
{
|
|
content: 'globalThis.__injected = "</script><h1>inject2</h1><!--"',
|
|
},
|
|
],
|
|
},
|
|
provide: {
|
|
someKey: "</script><h1>inject1</h1><!--",
|
|
},
|
|
},
|
|
})
|