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

Function checkFileAccess

packages/browser/src/node/rpc.ts:117–123  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

115 }
116
117 function checkFileAccess(path: string) {
118 if (!isFileLoadingAllowed(vite.config, path)) {
119 throw new Error(
120 `Access denied to "${path}". See Vite config documentation for "server.fs": https://vitejs.dev/config/server-options.html#server-fs-strict.`,
121 )
122 }
123 }
124
125 function canWrite(project: TestProject) {
126 return (

Callers 3

readSnapshotFileFunction · 0.85
saveSnapshotFileFunction · 0.85
removeSnapshotFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected