Add failing spec for native image path normalization

This commit is contained in:
Kevin Sawicki 2016-03-04 12:03:13 -08:00
parent 3f4455a79d
commit dda7740399

13
spec/native-image-spec.js Normal file
View file

@ -0,0 +1,13 @@
const assert = require('assert');
const nativeImage = require('electron').nativeImage;
const path = require('path');
describe('nativeImage module', function () {
describe('createFromPath(path)', function () {
it('normalizes paths', function () {
const nonAbsolutePath = path.join(__dirname, 'fixtures', 'api') + path.sep + '..' + path.sep + path.join('assets', 'logo.png');
const image = nativeImage.createFromPath(nonAbsolutePath);
assert(!image.isEmpty());
});
});
});