MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / captureScreenShot

Function captureScreenShot

src/test/common.web.ts:18–29  ·  view source on GitHub ↗

* Captures screenshots (png format) & dumpts into root directory (only on CI). * If there's a failure, it will be logged (errors are swallowed).

(contextOrFileName: string | Mocha.Context)

Source from the content-addressed store, hash-verified

16 * If there's a failure, it will be logged (errors are swallowed).
17 */
18async function captureScreenShot(contextOrFileName: string | Mocha.Context) {
19 if (!isCI) {
20 return;
21 }
22 const filename = await generateScreenShotFileName(contextOrFileName);
23 try {
24 await ClientAPI.captureScreenShot(filename);
25 console.info(`Screenshot captured into ${filename}`);
26 } catch (ex) {
27 console.error(`Failed to capture screenshot into ${filename}`, ex);
28 }
29}
30
31export function initializeCommonWebApi() {
32 initializeCommonApi({

Callers

nothing calls this directly

Calls 4

captureScreenShotMethod · 0.80
infoMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected