MCPcopy
hub / github.com/vitest-dev/vitest / vitest

Function vitest

test/cli/test/config/browser-configs.test.ts:12–16  ·  view source on GitHub ↗
(cliOptions: TestUserConfig, configValue: TestUserConfig = {}, viteConfig: ViteUserConfig = {}, vitestOptions: VitestOptions = {})

Source from the content-addressed store, hash-verified

10import { createVitest } from 'vitest/node'
11
12async function vitest(cliOptions: TestUserConfig, configValue: TestUserConfig = {}, viteConfig: ViteUserConfig = {}, vitestOptions: VitestOptions = {}) {
13 const vitest = await createVitest('test', { ...cliOptions, watch: false, config: false }, { ...viteConfig, test: configValue as any }, vitestOptions)
14 onTestFinished(() => vitest.close())
15 return vitest
16}
17
18test('assigns names as browsers', async () => {
19 const { projects } = await vitest({}, {

Callers 1

Calls 2

createVitestFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected