diff --git a/ospec/tests/test-ospec.js b/ospec/tests/test-ospec.js index 9b9d0c5d6..3ab3fa993 100644 --- a/ospec/tests/test-ospec.js +++ b/ospec/tests/test-ospec.js @@ -134,78 +134,6 @@ o.spec("reporting", function() { }) }) - -new function(o) { - var clone = o.new() - - clone.spec("clone", function() { - clone("fail", function() { - clone(true).equals(false) - }) - - clone("pass", function() { - clone(true).equals(true) - }) - }) - - // Predicate test passing on clone results - o.spec("reporting", function() { - o("reports per instance", function(done, timeout) { - timeout(100) // Waiting on clone - - clone.run(function(results) { - o(typeof results).equals("object") - o("length" in results).equals(true) - o(results.length).equals(2)("Two results") - - o("error" in results[0] && "pass" in results[0]).equals(true)("error and pass keys present in failing result") - o(!("error" in results[1]) && "pass" in results[1]).equals(true)("only pass key present in passing result") - o(results[0].pass).equals(false)("Test meant to fail has failed") - o(results[1].pass).equals(true)("Test meant to pass has passed") - - done() - }) - }) - o("o.report() returns the number of failures", function () { - var log = console.log, error = console.error - console.log = o.spy() - console.error = o.spy() - - function makeError(msg) {try{throw msg ? new Error(msg) : new Error} catch(e){return e}} - try { - var errCount = o.report([{pass: true}, {pass: true}]) - - o(errCount).equals(0) - o(console.log.callCount).equals(1) - o(console.error.callCount).equals(0) - - errCount = o.report([ - {pass: false, error: makeError("hey"), message: "hey"} - ]) - - o(errCount).equals(1) - o(console.log.callCount).equals(2) - o(console.error.callCount).equals(1) - - errCount = o.report([ - {pass: false, error: makeError("hey"), message: "hey"}, - {pass: true}, - {pass: false, error: makeError("ho"), message: "ho"} - ]) - - o(errCount).equals(2) - o(console.log.callCount).equals(3) - o(console.error.callCount).equals(3) - } catch (e) { - o(1).equals(0)("Error while testing the reporter") - } - - console.log = log - console.error = error - }) - }) -}(o) - o.spec("ospec", function() { o.spec("sync", function() { var a = 0, b = 0, illegalAssertionThrows = false diff --git a/package-lock.json b/package-lock.json index c112fc71a..4660adbf5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mithril", - "version": "1.1.3", + "version": "1.1.6", "lockfileVersion": 1, "requires": true, "dependencies": {