diff --git a/test/fixture/foo/null b/test/fixture/foo/null new file mode 100644 index 000000000..e69de29bb diff --git a/test/fixture/package.json b/test/fixture/package.json new file mode 100644 index 000000000..8bad72c23 --- /dev/null +++ b/test/fixture/package.json @@ -0,0 +1,29 @@ +{ + "name": "", + "productName": "", + "version": "1.0.0", + "description": "", + "main": "src/index.js", + "scripts": { + "start": "electron-forge start" + }, + "keywords": [], + "author": "", + "license": "MIT", + "config": { + "forge": { + "make_targets": { + "win32": ["squirrel"], + "darwin": ["zip"], + "linux": ["deb", "rpm"] + }, + "electronPackagerConfig": {}, + "electronWinstallerConfig": {}, + "electronInstallerDebian": {}, + "electronInstallerRedhat": {} + } + }, + "devDependencies": { + "electron-prebuilt-compile": "9.9.9" + } +} diff --git a/test/util_spec.js b/test/util_spec.js index 27cba214b..6593cf44b 100644 --- a/test/util_spec.js +++ b/test/util_spec.js @@ -9,7 +9,7 @@ describe('resolve-dir', () => { }); it('should return a directory if it finds a node module', async () => { - expect(await resolveDir(path.resolve(__dirname, '../tmpl'))).to.not.be.equal(null); - expect(await resolveDir(path.resolve(__dirname, '../tmpl'))).to.be.equal(path.resolve(__dirname, '../tmpl')); + expect(await resolveDir(path.resolve(__dirname, 'fixture/foo'))).to.not.be.equal(null); + expect(await resolveDir(path.resolve(__dirname, 'fixture/foo'))).to.be.equal(path.resolve(__dirname, 'fixture')); }); });