test: make initial test platform independent
This commit is contained in:
parent
6a8e36ca2a
commit
e7dcdb9580
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue