mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 05:07:05 +00:00
Run prettier over ALL files once
No other changes done in this commit
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
const Application = require("spectron").Application;
|
||||
const assert = require("assert");
|
||||
@@ -14,12 +14,12 @@ const chai = require("chai");
|
||||
const chaiAsPromised = require("chai-as-promised");
|
||||
const path = require("path");
|
||||
|
||||
global.before(function() {
|
||||
global.before(function () {
|
||||
chai.should();
|
||||
chai.use(chaiAsPromised);
|
||||
});
|
||||
|
||||
exports.getElectronPath = function() {
|
||||
exports.getElectronPath = function () {
|
||||
var electronPath = path.join(__dirname, "..", "..", "node_modules", ".bin", "electron");
|
||||
if (process.platform === "win32") {
|
||||
electronPath += ".cmd";
|
||||
@@ -28,7 +28,7 @@ exports.getElectronPath = function() {
|
||||
};
|
||||
|
||||
// Set timeout - if this is run within Travis, increase timeout
|
||||
exports.setupTimeout = function(test) {
|
||||
exports.setupTimeout = function (test) {
|
||||
if (process.env.CI) {
|
||||
test.timeout(30000);
|
||||
} else {
|
||||
@@ -36,26 +36,26 @@ exports.setupTimeout = function(test) {
|
||||
}
|
||||
};
|
||||
|
||||
exports.startApplication = function(options) {
|
||||
exports.startApplication = function (options) {
|
||||
options.path = exports.getElectronPath();
|
||||
if (process.env.CI) {
|
||||
options.startTimeout = 30000;
|
||||
}
|
||||
|
||||
var app = new Application(options);
|
||||
return app.start().then(function() {
|
||||
return app.start().then(function () {
|
||||
assert.equal(app.isRunning(), true);
|
||||
chaiAsPromised.transferPromiseness = app.transferPromiseness;
|
||||
return app;
|
||||
});
|
||||
};
|
||||
|
||||
exports.stopApplication = function(app) {
|
||||
exports.stopApplication = function (app) {
|
||||
if (!app || !app.isRunning()) {
|
||||
return;
|
||||
}
|
||||
|
||||
return app.stop().then(function() {
|
||||
return app.stop().then(function () {
|
||||
assert.equal(app.isRunning(), false);
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user