Add failing spec for native image path normalization
This commit is contained in:
parent
3f4455a79d
commit
dda7740399
1 changed files with 13 additions and 0 deletions
13
spec/native-image-spec.js
Normal file
13
spec/native-image-spec.js
Normal 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());
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue