From 1b2157f031f8fe7ac415cd6da8f94de3f876a581 Mon Sep 17 00:00:00 2001 From: Xymorot Date: Wed, 16 Oct 2019 21:37:36 +0200 Subject: [PATCH] test: use before and after instead of beforeEach and afterEach in main.spec.ts (also move @slow tag to suite) --- tests/main.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/main.spec.ts b/tests/main.spec.ts index c0dfcd1..d3bfe74 100644 --- a/tests/main.spec.ts +++ b/tests/main.spec.ts @@ -1,13 +1,13 @@ import { expect } from 'chai'; import * as electron from 'electron'; -import { afterEach, beforeEach, describe, it } from 'mocha'; +import { after, before, describe, it } from 'mocha'; import { Application } from 'spectron'; import packageJson from '../package.json'; -describe('Application', function() { +describe('Application @slow', function() { this.timeout(20000); - beforeEach(function() { + before(function() { this.app = new Application({ // @ts-ignore this does give the path to electron executable (hopefully platform agnostic) path: electron.default, @@ -16,13 +16,13 @@ describe('Application', function() { return this.app.start(); }); - afterEach(function() { + after(function() { if (this.app && this.app.isRunning()) { return this.app.stop(); } }); - it('shows an initial window @slow', function() { + it('shows an initial window', function() { return this.app.client.getWindowCount().then((count: number) => { expect(count).to.be.gte(1); });