linuxwindowsinboxwhatsappicloudtweetdeckhipchattelegramhangoutsslackgmailskypefacebook-workplaceoutlookemailmicrosoft-teamsdiscordmessengercustom-servicesmacos
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
665 B
39 lines
665 B
8 years ago
|
|
||
6 years ago
|
const Application = require('spectron').Application;
|
||
|
const electron = require('electron');
|
||
8 years ago
|
|
||
|
/**
|
||
6 years ago
|
* The HamsketTestHelper contains common stuff for tests.
|
||
8 years ago
|
*/
|
||
|
module.exports = function() {
|
||
|
|
||
6 years ago
|
const self = this;
|
||
8 years ago
|
|
||
|
/**
|
||
6 years ago
|
* Makes the Hamsket Application available.
|
||
8 years ago
|
*
|
||
|
* @type {Application}
|
||
|
*/
|
||
|
self.app = null;
|
||
|
|
||
|
/**
|
||
6 years ago
|
* Starts Hamsket from '/electron/main.js/'.
|
||
8 years ago
|
*/
|
||
|
beforeEach(function() {
|
||
|
self.app = new Application({
|
||
|
path: electron,
|
||
|
args: [__dirname + '/../../electron/main.js']
|
||
|
});
|
||
|
return self.app.start();
|
||
|
});
|
||
|
|
||
|
/**
|
||
6 years ago
|
* Stops Hamsket.
|
||
8 years ago
|
*/
|
||
|
afterEach(function() {
|
||
|
if (self.app && self.app.isRunning()) {
|
||
|
return self.app.stop()
|
||
|
}
|
||
|
});
|
||
|
};
|