diff --git a/test/integration/launch.spec.ts b/test/integration/launch.spec.ts index 28c9220..78b0ff9 100644 --- a/test/integration/launch.spec.ts +++ b/test/integration/launch.spec.ts @@ -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();