test: make nativeImage relative path test robust to different cwd
This commit is contained in:
parent
00b2d94785
commit
c068bc7d3d
1 changed files with 1 additions and 1 deletions
|
@ -280,7 +280,7 @@ describe('nativeImage module', () => {
|
|||
})
|
||||
|
||||
it('loads images from paths relative to the current working directory', () => {
|
||||
const imagePath = `.${path.sep}${path.join('spec', 'fixtures', 'assets', 'logo.png')}`
|
||||
const imagePath = path.relative('.', path.join(__dirname, 'fixtures', 'assets', 'logo.png'))
|
||||
const image = nativeImage.createFromPath(imagePath)
|
||||
expect(image.isEmpty()).to.be.false()
|
||||
expect(image.getSize()).to.deep.equal({width: 538, height: 190})
|
||||
|
|
Loading…
Reference in a new issue