(filePath, lossless)
| 97 | } |
| 98 | |
| 99 | async 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 | |
| 117 | async function takeScreenshot(page, fullPage, fileUrl, desc, isExpected, minor) { |
| 118 | let screenshotName = testNameFromFile(fileUrl); |
no outgoing calls
no test coverage detected
searching dependent graphs…