File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -402,6 +402,10 @@ declare class TestProject {
402402 * @experimental The public Vitest API is experimental and does not follow semver.
403403 */
404404 readonly workspaceProject: WorkspaceProject
405+ /**
406+ * Vite's dev server instance. Every workspace project has its own server.
407+ */
408+ readonly vite: ViteDevServer
405409 /**
406410 * Resolved project configuration.
407411 */
Original file line number Diff line number Diff line change 1+ import type { ViteDevServer } from 'vite'
12import type { ProvidedContext } from '../types/general'
23import type { Vitest } from './core'
34import type { ResolvedConfig , ResolvedProjectConfig , SerializedConfig } from './types/config'
@@ -15,6 +16,10 @@ export class TestProject {
1516 */
1617 public readonly workspaceProject : WorkspaceProject
1718
19+ /**
20+ * Vite's dev server instance. Every workspace project has its own server.
21+ */
22+ public readonly vite : ViteDevServer
1823 /**
1924 * Resolved project configuration.
2025 */
@@ -32,6 +37,7 @@ export class TestProject {
3237 constructor ( workspaceProject : WorkspaceProject ) {
3338 this . workspaceProject = workspaceProject
3439 this . vitest = workspaceProject . ctx
40+ this . vite = workspaceProject . server
3541 this . globalConfig = workspaceProject . ctx . config
3642 this . config = workspaceProject . config
3743 this . name = workspaceProject . getName ( )
You can’t perform that action at this time.
0 commit comments