test: make initial test platform independent

This commit is contained in:
Xymorot 2019-10-06 22:29:04 +02:00
parent 6a8e36ca2a
commit e7dcdb9580
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import * as assert from 'assert';
import * as electron from 'electron';
import { afterEach, beforeEach, describe, it } from 'mocha';
import * as path from 'path';
import { Application } from 'spectron';
import packageJson from '../../package.json';
@ -9,7 +9,8 @@ describe('Application Launch', function(): void {
beforeEach(function(): any {
this.app = new Application({
path: path.resolve('node_modules', 'electron', 'dist', 'electron.exe'),
// @ts-ignore this does give the path to electron executable (hopefully platform agnostic)
path: electron.default,
args: [packageJson.main],
});
return this.app.start();