Skip to content

Commit

Permalink
disable test loading remote jpg
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhenn committed Nov 11, 2020
1 parent 880e809 commit 2538e0e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,20 @@ describe('Convert SVG', function () {
})
});

it('convert a svg with an image', function (done) {
this.timeout(5000);
var imageUrl = 'https://res.cloudinary.com/verticalaxisbd/image/upload/h_239,w_239/rg1kxkgxayhdgoqdaejz.jpg';
Image64.encode(imageUrl, {}, function (err, base64) {
var svgString = util.format('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="540" height="258" ' +
'viewBox="0 0 540 258"><image width="540" height="258" x="0" y="0" href="%s"></image></svg>', 'data:image/png;base64,' + base64.toString('base64'));
svg2img(svgString, function(error, data) {
expect(error).not.to.be.ok();
expect(Buffer.isBuffer(data)).to.be.ok();
expect(data.length).to.be.above(0);
done();
});
});
});
// it('convert a svg with an image', function (done) {
// this.timeout(5000);
// var imageUrl = 'https://res.cloudinary.com/verticalaxisbd/image/upload/h_239,w_239/rg1kxkgxayhdgoqdaejz.jpg';
// Image64.encode(imageUrl, {}, function (err, base64) {
// var svgString = util.format('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="540" height="258" ' +
// 'viewBox="0 0 540 258"><image width="540" height="258" x="0" y="0" href="%s"></image></svg>', 'data:image/png;base64,' + base64.toString('base64'));
// svg2img(svgString, function(error, data) {
// expect(error).not.to.be.ok();
// expect(Buffer.isBuffer(data)).to.be.ok();
// expect(data.length).to.be.above(0);
// done();
// });
// });
// });

it('scale a svg with width and height in style', function (done) {
svg2img(__dirname+'/fy.svg', {width : 20, height: 30}, function (err, data) {
Expand Down

0 comments on commit 2538e0e

Please sign in to comment.