MCPcopy Create free account
hub / github.com/vitest-dev/vitest / assertBrowserApiWrite

Function assertBrowserApiWrite

packages/browser/src/node/utils.ts:112–118  ·  view source on GitHub ↗
(project: TestProject, path: string)

Source from the content-addressed store, hash-verified

110}
111
112export function assertBrowserApiWrite(project: TestProject, path: string): void {
113 if (!project.config.browser.api.allowWrite || !project.vitest.config.api.allowWrite) {
114 throw new Error(
115 `Cannot modify file "${path}". File writing is disabled because the server is exposed to the internet, see https://vitest.dev/config/browser/api.`,
116 )
117 }
118}

Callers 8

writeFileFunction · 0.90
removeFileFunction · 0.90
writeScreenshotFunction · 0.90
takeScreenshotFunction · 0.90
stopChunkTraceFunction · 0.90
deleteTracingFunction · 0.90
annotateTracesFunction · 0.90
takeScreenshotFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected