From bc1c143ccd7e46787c991e135449fe00d21ffb46 Mon Sep 17 00:00:00 2001 From: Lauri Nevala Date: Mon, 17 Aug 2020 12:18:29 +0300 Subject: [PATCH] More cleanups Signed-off-by: Lauri Nevala --- integration/helpers/utils.ts | 4 ++-- integration/specs/app_spec.ts | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) 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)