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

Function returnResult

packages/browser/src/node/commands/screenshot.ts:37–49  ·  view source on GitHub ↗
(
  options: ScreenshotCommandOptions,
  path: string,
  buffer: Buffer,
)

Source from the content-addressed store, hash-verified

35}
36
37function returnResult(
38 options: ScreenshotCommandOptions,
39 path: string,
40 buffer: Buffer,
41) {
42 if (!options.save) {
43 return buffer.toString('base64')
44 }
45 if (options.base64) {
46 return { path, base64: buffer.toString('base64') }
47 }
48 return path
49}

Callers 1

screenshotFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected