fixed and reenabled lockstring test

This commit is contained in:
fewieden 2018-02-16 08:43:27 +01:00
parent 3e2a1e3548
commit a756fed70b

View File

@ -6,9 +6,11 @@ const {JSDOM} = require("jsdom");
describe("File js/class", function() {
describe("Test function cloneObject", function() {
let clone;
let dom;
before(function(done) {
const dom = new JSDOM(`<script src="${path.join(__dirname, "..", "..", "..", "js", "class.js")}">`, { runScripts: "dangerously",
dom = new JSDOM(`<script>var Log = {log: function() {}};</script>\
<script src="${path.join(__dirname, "..", "..", "..", "js", "class.js")}">`, { runScripts: "dangerously",
resources: "usable" });
dom.window.onload = function() {
const {cloneObject} = dom.window;
@ -45,17 +47,28 @@ describe("File js/class", function() {
expect(undefined).to.equal(obj);
});
// CoverageME
/*
context("Test lockstring code", function() {
it("should be return equals object", function() {
describe("Test lockstring code", function() {
let log;
before(function() {
log = dom.window.Log.log;
dom.window.Log.log = function cmp(str) {
expect(str).to.equal("lockStrings");
};
});
after(function() {
dom.window.Log.log = log;
});
it("should be return equals object and log lockStrings", function() {
const expected = {name: "Module", lockStrings: "stringLock"};
let obj = {};
obj = clone(expected);
expect(expected).to.deep.equal(obj);
});
});
*/
});
});