MCPcopy
hub / github.com/apache/echarts / convertToWebP

Function convertToWebP

test/runTest/cli.js:99–115  ·  view source on GitHub ↗
(filePath, lossless)

Source from the content-addressed store, hash-verified

97}
98
99async function convertToWebP(filePath, lossless) {
100 const webpPath = filePath.replace(/\.png$/, '.webp');
101 return new Promise((resolve, reject) => {
102 execFile(cwebpBin, [
103 filePath,
104 '-o', webpPath,
105 ...(lossless ? ['-lossless'] : ['-q', 75])
106 ], (err) => {
107 if (err) {
108 reject(err);
109 }
110 else {
111 resolve(webpPath);
112 }
113 });
114 });
115}
116
117async function takeScreenshot(page, fullPage, fileUrl, desc, isExpected, minor) {
118 let screenshotName = testNameFromFile(fileUrl);

Callers 2

takeScreenshotFunction · 0.85
runTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…