Skip to content

Commit 3bd8cb3

Browse files
committed
darnit
1 parent 7786f36 commit 3bd8cb3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/canvas.test.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -2516,13 +2516,17 @@ describe('Canvas', function () {
25162516

25172517
describe('loadImage', function () {
25182518
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+
25192526
await assert.rejects(async () => {
25202527
const svg = `<svg xmlns="http://www.w3.org/2000/svg"><path d="M1,1"/></svg>`;
25212528
await loadImage(Buffer.from(svg));
2522-
}, {
2523-
name: "Error",
2524-
message: "Width and height must be set on the svg element"
2525-
});
2529+
}, err);
25262530
});
25272531
});
25282532
})

0 commit comments

Comments
 (0)