Skip to content

Commit

Permalink
fix browser tests (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie authored Sep 19, 2018
1 parent 04bfcb5 commit aefcc84
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ describe('Fisheye', () => {
mkJGD(
'■■■■■■■■■■',
'■■■■■■■■■■',
'■■■■111■■■',
'■■111111■■',
'■■1111111■',
'■■1111111■',
'■■1111111■',
'■■■■■■■■■■',
'■■■11111■■',
'■■111111■■',
'■■111111■■',
'■■■■111■■■',
'■■■■■■■■■■',
'■■■■■■■■■■',
'■■■■■■■■■■'
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ describe('Shadow', () => {

testImage
.shadow({ x: -1, y: 1, blur: 1 })
.write('shadow.png')
.bitmap.data.should.be.deepEqual(expectedImg.bitmap.data);
});
});
8 changes: 6 additions & 2 deletions packages/type-png/test/png.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,12 @@ describe('PNG', () => {
.colorType(0)
.getBufferAsync(Jimp.MIME_PNG);

const expected = fs.readFileSync(imagesDir + '/options.png');
const expected = await jimp.read(imagesDir + '/options.png');
const expectedBuffer = await expected
.deflateStrategy(0)
.colorType(0)
.getBufferAsync(Jimp.MIME_PNG);

image.should.be.deepEqual(expected);
image.should.be.deepEqual(expectedBuffer);
});
});

0 comments on commit aefcc84

Please sign in to comment.