test(resolve-dir): add a fixture that is actually an electron-forge package.json file
This commit is contained in:
Родитель
f1f06acf36
Коммит
e0e712dd8d
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -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'));
|
||||
});
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче