File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2516,13 +2516,17 @@ describe('Canvas', function () {
2516
2516
2517
2517
describe ( 'loadImage' , function ( ) {
2518
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
+
2519
2526
await assert . rejects ( async ( ) => {
2520
2527
const svg = `<svg xmlns="http://www.w3.org/2000/svg"><path d="M1,1"/></svg>` ;
2521
2528
await loadImage ( Buffer . from ( svg ) ) ;
2522
- } , {
2523
- name : "Error" ,
2524
- message : "Width and height must be set on the svg element"
2525
- } ) ;
2529
+ } , err ) ;
2526
2530
} ) ;
2527
2531
} ) ;
2528
2532
} )
You can’t perform that action at this time.
0 commit comments