additional tests for createFromBuffer
This commit is contained in:
parent
a609e52a14
commit
7ceb8d1ab8
2 changed files with 14 additions and 1 deletions
|
@ -29,6 +29,18 @@ describe('nativeImage module', () => {
|
|||
const imageD = nativeImage.createFromBuffer(imageA.toBitmap(),
|
||||
{width: 538, height: 190})
|
||||
assert.deepEqual(imageD.getSize(), {width: 538, height: 190})
|
||||
|
||||
const imageE = nativeImage.createFromBuffer(imageA.toBitmap(),
|
||||
{width: 100, height: 200})
|
||||
assert.deepEqual(imageE.getSize(), {width: 100, height: 200})
|
||||
|
||||
const imageF = nativeImage.createFromBuffer(imageA.toPNG(),
|
||||
{width: 100, height: 200})
|
||||
assert.deepEqual(imageF.getSize(), {width: 538, height: 190})
|
||||
|
||||
const imageG = nativeImage.createFromBuffer(imageA.toJPEG(100),
|
||||
{width: 100, height: 200})
|
||||
assert.deepEqual(imageG.getSize(), {width: 538, height: 190})
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue