mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 04:45:17 +00:00
First round of undef fixes
This commit is contained in:
@@ -8,6 +8,7 @@ const describe = global.describe;
|
||||
describe("All font files from roboto.css should be downloadable", function() {
|
||||
helpers.setupTimeout(this);
|
||||
|
||||
var app;
|
||||
var fontFiles = [];
|
||||
// Statements below filters out all 'url' lines in the CSS file
|
||||
var fileContent = require("fs").readFileSync(__dirname + "/../../fonts/roboto.css", "utf8");
|
||||
|
@@ -28,7 +28,7 @@ describe("Position of modules", function () {
|
||||
|
||||
var position;
|
||||
var className;
|
||||
for (idx in positions) {
|
||||
for (var idx in positions) {
|
||||
position = positions[idx];
|
||||
className = position.replace("_", ".");
|
||||
it("show text in " + position, function () {
|
||||
|
@@ -6,7 +6,6 @@ const describe = global.describe;
|
||||
const it = global.it;
|
||||
const before = global.before;
|
||||
const after = global.after;
|
||||
const mlog = require("mocha-logger");
|
||||
|
||||
describe("Vendors", function () {
|
||||
|
||||
@@ -30,7 +29,7 @@ describe("Vendors", function () {
|
||||
var vendors = require(__dirname + "/../../vendor/vendor.js");
|
||||
Object.keys(vendors).forEach(vendor => {
|
||||
it(`should return 200 HTTP code for vendor "${vendor}"`, function () {
|
||||
urlVendor = "http://localhost:8080/vendor/" + vendors[vendor];
|
||||
var urlVendor = "http://localhost:8080/vendor/" + vendors[vendor];
|
||||
request.get(urlVendor, function (err, res, body) {
|
||||
expect(res.statusCode).to.equal(200);
|
||||
});
|
||||
@@ -39,7 +38,7 @@ describe("Vendors", function () {
|
||||
|
||||
Object.keys(vendors).forEach(vendor => {
|
||||
it(`should return 404 HTTP code for vendor https://localhost/"${vendor}"`, function() {
|
||||
urlVendor = "http://localhost:8080/" + vendors[vendor];
|
||||
var urlVendor = "http://localhost:8080/" + vendors[vendor];
|
||||
request.get(urlVendor, function (err, res, body) {
|
||||
expect(res.statusCode).to.equal(404);
|
||||
});
|
||||
|
@@ -19,7 +19,8 @@ app.use(auth.connect(basic));
|
||||
// Set available directories
|
||||
var directories = ["/tests/configs"];
|
||||
var directory;
|
||||
rootPath = path.resolve(__dirname + "/../../");
|
||||
var rootPath = path.resolve(__dirname + "/../../");
|
||||
|
||||
for (var i in directories) {
|
||||
directory = directories[i];
|
||||
app.use(directory, express.static(path.resolve(rootPath + directory)));
|
||||
|
Reference in New Issue
Block a user