(filePath)
| 30 | const client = new DLP.DlpServiceClient(); |
| 31 | |
| 32 | async function readImage(filePath) { |
| 33 | return new Promise((resolve, reject) => { |
| 34 | fs.createReadStream(filePath) |
| 35 | .pipe(new PNG()) |
| 36 | .on('error', reject) |
| 37 | .on('parsed', function () { |
| 38 | resolve(this); |
| 39 | }); |
| 40 | }); |
| 41 | } |
| 42 | |
| 43 | async function getImageDiffPercentage(image1Path, image2Path) { |
| 44 | const image1 = await readImage(image1Path); |
no outgoing calls
no test coverage detected