2016-03-04 22:54:12 +00:00
|
|
|
'use strict';
|
|
|
|
|
2016-03-04 20:03:13 +00:00
|
|
|
const assert = require('assert');
|
|
|
|
const nativeImage = require('electron').nativeImage;
|
|
|
|
const path = require('path');
|
|
|
|
|
2016-03-04 22:54:12 +00:00
|
|
|
describe('nativeImage module', () => {
|
|
|
|
describe('createFromPath(path)', () => {
|
|
|
|
it('normalizes the path', () => {
|
|
|
|
const nonAbsolutePath = `${path.join(__dirname, 'fixtures', 'api')}${path.sep}..${path.sep}${path.join('assets', 'logo.png')}`;
|
2016-03-04 20:03:13 +00:00
|
|
|
const image = nativeImage.createFromPath(nonAbsolutePath);
|
|
|
|
assert(!image.isEmpty());
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|