First round of undef fixes

This commit is contained in:
rejas
2020-05-02 10:39:09 +02:00
parent d8f093b226
commit b9d19cfcb4
22 changed files with 56 additions and 50 deletions

View File

@@ -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");

View File

@@ -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 () {

View File

@@ -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);
});

View File

@@ -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)));