2016-03-04 20:03:13 +00:00
|
|
|
const assert = require('assert');
|
|
|
|
const nativeImage = require('electron').nativeImage;
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
describe('nativeImage module', function () {
|
|
|
|
describe('createFromPath(path)', function () {
|
2016-03-04 20:05:36 +00:00
|
|
|
it('normalizes the path', function () {
|
2016-03-04 20:03:13 +00:00
|
|
|
const nonAbsolutePath = path.join(__dirname, 'fixtures', 'api') + path.sep + '..' + path.sep + path.join('assets', 'logo.png');
|
|
|
|
const image = nativeImage.createFromPath(nonAbsolutePath);
|
|
|
|
assert(!image.isEmpty());
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|