git ssb

0+

cel-desktop / ssb-pkg



Tree: efcf9fd06b02fa9bcd28681b4c777224e19702bb

Files: efcf9fd06b02fa9bcd28681b4c777224e19702bb / test / test-79-npm / sharp / sharp.js

500 bytesRaw
1'use strict';
2
3var sharp = require('sharp');
4
5var source = Buffer.from(
6 '<svg><rect x="0" y="0" width="100" height="100" rx="50" ry="50"/></svg>'
7);
8
9sharp(source).rotate().toBuffer().then(function (output) {
10 if (output.slice(1, 4).toString() === 'PNG') {
11 console.log('ok');
12 process.exit();
13 }
14}).catch((error) => {
15 console.error(error);
16 process.exit(1);
17});
18
19setTimeout(() => {
20 // if test does not pass, it blocks
21 // any other way to exit
22 process.kill(process.pid);
23}, 3000);
24

Built with git-ssb-web