stop(done) { if (this.app && this.app.isRunning()) { this.app.stop() .then(() => { return knex.destroy(); }) .then(() => { rimraf(testsPath, done); }); } }
test.after.always('cleanup', async t => { console.log(JSON.stringify(await app.client.getMainProcessLogs(), null, 2)) await app.stop() })
.then(() => { return app.stop().then(() => assert.isFalse(app.isRunning())) })
afterEach(() => { if (app && app.isRunning()) { return app.stop(); } });
}).then(function () { // Stop the application return app.stop() }).catch(function (error) {
afterEach(function (done) { app.stop().then(function() { done(); }); });
}).catch(function (error) { // エラーをキャッチしたら、テストがエラーした旨のメッセージを表示する console.error("Test failed", error.message); return app.stop(); });
}).then(function () { // 終わったらアプリケーションを停止する console.info("Test Success"); return app.stop(); }).catch(function (error) {
test.after.always('cleanup', async t => { console.log(await app.client.getMainProcessLogs()) await app.stop() })
after(() => ( Promise.all([ app1.stop(), app2.browserWindow.close(), ]) ));
after(function () { if (App && App.isRunning()) { return App.stop() } })