Fixing bugs introduced by the big next merge
- Update package-lock.json - Remove (failing) dupe ospec suite Git didn't *quite* do the right thing here, so I had to fix a few things.
This commit is contained in:
parent
2635070734
commit
97b6125654
2 changed files with 1 additions and 73 deletions
|
|
@ -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("ospec", function() {
|
||||||
o.spec("sync", function() {
|
o.spec("sync", function() {
|
||||||
var a = 0, b = 0, illegalAssertionThrows = false
|
var a = 0, b = 0, illegalAssertionThrows = false
|
||||||
|
|
|
||||||
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mithril",
|
"name": "mithril",
|
||||||
"version": "1.1.3",
|
"version": "1.1.6",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue