diff --git a/integration/helpers/utils.ts b/integration/helpers/utils.ts index 39135181f2..72d6e3d732 100644 --- a/integration/helpers/utils.ts +++ b/integration/helpers/utils.ts @@ -14,7 +14,6 @@ case "darwin": } export function setup(): Application { - const userData = process.cwd() + "/.spectron" return new Application({ // path to electron app args: [], @@ -29,9 +28,10 @@ export function setup(): Application { } export async function tearDown(app: Application) { + const pid = app.mainProcess.pid await app.stop() try { - process.kill(app.mainProcess.pid, 0); + process.kill(pid, 0); } catch(e) { return } diff --git a/integration/specs/app_spec.ts b/integration/specs/app_spec.ts index de281d0c80..f3cb922740 100644 --- a/integration/specs/app_spec.ts +++ b/integration/specs/app_spec.ts @@ -1,9 +1,6 @@ import { Application } from "spectron" import * as util from "../helpers/utils" import { spawnSync } from "child_process" -import { stat } from "fs" -import logger from "../../src/main/logger" -import AppCanvas from "material-ui/internal/AppCanvas" jest.setTimeout(20000)