We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7786f36 commit 3bd8cb3Copy full SHA for 3bd8cb3
test/canvas.test.js
@@ -2516,13 +2516,17 @@ describe('Canvas', function () {
2516
2517
describe('loadImage', function () {
2518
it('doesn\'t crash when you don\'t specify width and height', async function () {
2519
+ const err = {name: "Error"};
2520
+
2521
+ // TODO: remove this when we have a static build or something
2522
+ if (os.platform !== 'win32') {
2523
+ err.message = "Width and height must be set on the svg element";
2524
+ }
2525
2526
await assert.rejects(async () => {
2527
const svg = `<svg xmlns="http://www.w3.org/2000/svg"><path d="M1,1"/></svg>`;
2528
await loadImage(Buffer.from(svg));
- }, {
- name: "Error",
- message: "Width and height must be set on the svg element"
- });
2529
+ }, err);
2530
});
2531
2532
})
0 commit comments