Skip to content

Commit

Permalink
fix(vitest): don't start a websocket server if api is disabled (#6617)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored Oct 2, 2024
1 parent f4a682d commit 821400b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/vitest/src/node/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export async function VitestPlugin(
...testConfig.api,
open,
hmr: false,
ws: testConfig.api?.middlewareMode ? false : undefined,
preTransformRequests: false,
fs: {
allow: resolveFsAllow(getRoot(), testConfig.config),
Expand Down
1 change: 1 addition & 0 deletions packages/vitest/src/node/plugins/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export function WorkspaceVitestPlugin(
watch: null,
open: false,
hmr: false,
ws: false,
preTransformRequests: false,
middlewareMode: true,
fs: {
Expand Down

0 comments on commit 821400b

Please sign in to comment.