|
@@ -48,5 +48,15 @@ describe('nativeImage module', () => {
|
|
|
// If all bytes are null, that's Bad
|
|
|
assert.equal(nsimage.reduce((acc, x) => acc || (x !== 0), false), true)
|
|
|
})
|
|
|
+
|
|
|
+ it('loads images from .ico files on Windows', () => {
|
|
|
+ if (process.platform !== 'win32') return
|
|
|
+
|
|
|
+ const imagePath = path.join(__dirname, 'fixtures', 'assets', 'icon.ico')
|
|
|
+ const image = nativeImage.createFromPath(imagePath)
|
|
|
+ assert(!image.isEmpty())
|
|
|
+ assert.equal(image.getSize().height, 256)
|
|
|
+ assert.equal(image.getSize().width, 256)
|
|
|
+ })
|
|
|
})
|
|
|
})
|