This commit is contained in:
Karsten Hassel 2021-09-26 00:29:03 +02:00
parent d831315e20
commit 385e5aabaa
2 changed files with 8 additions and 3 deletions

View File

@ -8,7 +8,7 @@ let config = {
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.10.1"], ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.10.1"],
language: "en", language: "en",
timeFormat: 24, timeFormat: 24,
units: "metric", units: "metric"
}; };
/*************** DO NOT EDIT THE LINE BELOW ***************/ /*************** DO NOT EDIT THE LINE BELOW ***************/

View File

@ -1,12 +1,17 @@
const helpers = require("../global-setup"); const helpers = require("../global-setup");
doTest = function (complimentsArray) { /**
* move similar tests in function doTest
*
* @param {Array} complimentsArray The array of compliments.
*/
function doTest(complimentsArray) {
let elem = document.querySelector(".compliments"); let elem = document.querySelector(".compliments");
expect(elem).not.toBe(null); expect(elem).not.toBe(null);
elem = document.querySelector(".module-content"); elem = document.querySelector(".module-content");
expect(elem).not.toBe(null); expect(elem).not.toBe(null);
expect(complimentsArray).toContain(elem.textContent); expect(complimentsArray).toContain(elem.textContent);
}; }
describe("Compliments module", function () { describe("Compliments module", function () {
afterAll(function () { afterAll(function () {