mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Cleanup imports
This commit is contained in:
parent
69aafd7d6a
commit
702b98f510
@ -1,13 +1,8 @@
|
||||
const helpers = require("./global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
const it = global.it;
|
||||
const beforeEach = global.beforeEach;
|
||||
const afterEach = global.afterEach;
|
||||
|
||||
describe("Development console tests", function() {
|
||||
// This tests fail and crash another tests
|
||||
|
@ -1,7 +1,5 @@
|
||||
const helpers = require("./global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
|
@ -1,14 +1,9 @@
|
||||
const helpers = require("./global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
const forEach = require("mocha-each");
|
||||
|
||||
const describe = global.describe;
|
||||
const it = global.it;
|
||||
const beforeEach = global.beforeEach;
|
||||
const afterEach = global.afterEach;
|
||||
const forEach = require("mocha-each");
|
||||
|
||||
describe("All font files from roboto.css should be downloadable", function() {
|
||||
helpers.setupTimeout(this);
|
||||
|
@ -12,7 +12,6 @@ const Application = require("spectron").Application;
|
||||
const assert = require("assert");
|
||||
const chai = require("chai");
|
||||
const chaiAsPromised = require("chai-as-promised");
|
||||
|
||||
const path = require("path");
|
||||
|
||||
global.before(function() {
|
||||
|
@ -1,7 +1,5 @@
|
||||
const helpers = require("./global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
|
@ -1,10 +1,6 @@
|
||||
const helpers = require("../global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
const serverBasicAuth = require("../../servers/basic-auth.js");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
const it = global.it;
|
||||
const beforeEach = global.beforeEach;
|
||||
|
@ -1,8 +1,4 @@
|
||||
const helpers = require("../global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
const it = global.it;
|
||||
@ -86,5 +82,4 @@ describe("Clock set to spanish language module", function() {
|
||||
.getText(".clock .week").should.eventually.match(weekRegex);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -1,8 +1,4 @@
|
||||
const helpers = require("../global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
const it = global.it;
|
||||
|
@ -1,7 +1,4 @@
|
||||
const helpers = require("../global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
|
@ -1,8 +1,4 @@
|
||||
const helpers = require("../global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
const it = global.it;
|
||||
@ -24,7 +20,6 @@ describe("Test helloworld module", function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
afterEach(function() {
|
||||
return helpers.stopApplication(app);
|
||||
});
|
||||
@ -52,5 +47,4 @@ describe("Test helloworld module", function() {
|
||||
.getText(".helloworld").should.eventually.equal("Hello World!");
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -1,8 +1,4 @@
|
||||
const helpers = require("../global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
const it = global.it;
|
||||
|
@ -1,13 +1,7 @@
|
||||
const helpers = require("./global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
const it = global.it;
|
||||
const beforeEach = global.beforeEach;
|
||||
const afterEach = global.afterEach;
|
||||
|
||||
describe("Position of modules", function () {
|
||||
helpers.setupTimeout(this);
|
||||
@ -26,7 +20,6 @@ describe("Position of modules", function () {
|
||||
return helpers.startApplication({
|
||||
args: ["js/electron.js"]
|
||||
}).then(function (startedApp) { app = startedApp; })
|
||||
|
||||
});
|
||||
|
||||
var positions = ["top_bar", "top_left", "top_center", "top_right", "upper_third",
|
||||
@ -44,5 +37,4 @@ describe("Position of modules", function () {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -1,7 +1,5 @@
|
||||
const helpers = require("./global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
|
@ -1,7 +1,5 @@
|
||||
const helpers = require("./global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
|
@ -1,8 +1,4 @@
|
||||
const helpers = require("./global-setup");
|
||||
const path = require("path");
|
||||
const request = require("request");
|
||||
|
||||
const expect = require("chai").expect;
|
||||
|
||||
const describe = global.describe;
|
||||
const it = global.it;
|
||||
@ -38,6 +34,5 @@ describe("Check configuration without modules", function () {
|
||||
return app.client.waitUntilWindowLoaded()
|
||||
.getText("#module_5_helloworld .module-content").should.eventually.equal("www.michaelteeuw.nl");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
var http = require("http");
|
||||
var path = require("path");
|
||||
var auth = require("http-auth");
|
||||
var express = require("express");
|
||||
|
@ -1,5 +1,4 @@
|
||||
const chai = require("chai");
|
||||
const expect = chai.expect;
|
||||
const expect = require("chai").expect;
|
||||
const path = require("path");
|
||||
const {JSDOM} = require("jsdom");
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
const chai = require("chai");
|
||||
const expect = chai.expect;
|
||||
const expect = require("chai").expect;
|
||||
const deprecated = require("../../../js/deprecated");
|
||||
|
||||
describe("Deprecated", function() {
|
||||
|
@ -1,7 +1,5 @@
|
||||
const chai = require("chai");
|
||||
const expect = chai.expect;
|
||||
const expect = require("chai").expect;
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
const helmet = require("helmet");
|
||||
const {JSDOM} = require("jsdom");
|
||||
const express = require("express");
|
||||
|
@ -1,5 +1,4 @@
|
||||
var chai = require("chai");
|
||||
var expect = chai.expect;
|
||||
var expect = require("chai").expect;
|
||||
var Utils = require("../../../js/utils.js");
|
||||
var colors = require("colors/safe");
|
||||
|
||||
@ -38,4 +37,3 @@ describe("Utils", function() {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
const chai = require("chai");
|
||||
const expect = chai.expect;
|
||||
const expect = require("chai").expect;
|
||||
const path = require("path");
|
||||
const {JSDOM} = require("jsdom");
|
||||
|
||||
@ -29,4 +28,3 @@ describe("Test function cmpVersions in js/module.js", function() {
|
||||
expect(cmp("1.1", "1.0")).to.equal(1);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -1,13 +1,7 @@
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var chai = require("chai");
|
||||
var expect = chai.expect;
|
||||
var vm = require("vm");
|
||||
|
||||
var expect = require("chai").expect;
|
||||
|
||||
describe("Functions module currentweather", function() {
|
||||
|
||||
|
||||
// Fake for use by currentweather.js
|
||||
Module = {};
|
||||
config = {};
|
||||
@ -16,7 +10,6 @@ describe("Functions module currentweather", function() {
|
||||
Module.definitions[name] = moduleDefinition;
|
||||
};
|
||||
|
||||
|
||||
before(function(){
|
||||
require("../../../modules/default/currentweather/currentweather.js");
|
||||
Module.definitions.currentweather.config = {};
|
||||
@ -48,7 +41,6 @@ describe("Functions module currentweather", function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("this.config.roundTemp is false", function() {
|
||||
|
||||
before(function(){
|
||||
|
@ -1,9 +1,4 @@
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var chai = require("chai");
|
||||
var expect = chai.expect;
|
||||
var vm = require("vm");
|
||||
|
||||
var expect = require("chai").expect;
|
||||
|
||||
describe("Functions into modules/default/newsfeed/newsfeed.js", function() {
|
||||
|
||||
@ -32,6 +27,5 @@ describe("Functions into modules/default/newsfeed/newsfeed.js", function() {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var chai = require("chai");
|
||||
var expect = chai.expect;
|
||||
var vm = require("vm");
|
||||
|
||||
var expect = require("chai").expect;
|
||||
|
||||
describe("Functions module weatherforecast", function() {
|
||||
|
||||
@ -44,7 +39,6 @@ describe("Functions module weatherforecast", function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("this.config.roundTemp is false", function() {
|
||||
|
||||
before(function(){
|
||||
|
@ -1,7 +1,6 @@
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var chai = require("chai");
|
||||
var expect = chai.expect;
|
||||
var expect = require("chai").expect;
|
||||
var vm = require("vm");
|
||||
|
||||
before(function() {
|
||||
@ -62,5 +61,4 @@ describe("Default modules set in modules/default/defaultmodules.js", function()
|
||||
expect(fs.existsSync(path.join(this.sandbox.global.root_path, "modules/default", defaultModule))).to.equal(true);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -1,7 +1,6 @@
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var chai = require("chai");
|
||||
var expect = chai.expect;
|
||||
var expect = require("chai").expect;
|
||||
var vm = require("vm");
|
||||
|
||||
before(function() {
|
||||
@ -66,6 +65,4 @@ describe("'global.root_path' set in js/app.js", function() {
|
||||
versionPackage = JSON.parse(fs.readFileSync("package.json", "utf8")).version;
|
||||
expect(this.sandbox.global.version).to.equal(versionPackage);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user