Fix compatibility with safari
This commit is contained in:
parent
b78f58d719
commit
d117d5634c
36
game.test.js
36
game.test.js
@ -23,26 +23,24 @@ class describe {
|
|||||||
this.passedtests = 0;
|
this.passedtests = 0;
|
||||||
this.starttime = 0;
|
this.starttime = 0;
|
||||||
console.log(this.testname)
|
console.log(this.testname)
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach = (cb)=>{
|
this.beforeEach = (cb)=>{
|
||||||
this.beforecb = cb
|
this.beforecb = cb
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
this.it = (checkname,cb)=>{
|
||||||
it = (checkname,cb)=>{
|
this.starttime = new Date().getTime()
|
||||||
this.starttime = new Date().getTime()
|
console.log("->"+checkname)
|
||||||
console.log("->"+checkname)
|
this.beforecb()
|
||||||
this.beforecb()
|
this.cb=cb;
|
||||||
this.cb=cb;
|
this.cb()
|
||||||
this.cb()
|
return this
|
||||||
return this
|
}
|
||||||
}
|
this.showResults = () =>{
|
||||||
|
console.log("==============")
|
||||||
showResults = () =>{
|
console.log("TEST RESULTS: "+TestSuite.passedtests+" passed, "+(TestSuite.totaltests-TestSuite.passedtests)+" failed, "+TestSuite.totaltests+" total")
|
||||||
console.log("==============")
|
console.log("==============")
|
||||||
console.log("TEST RESULTS: "+TestSuite.passedtests+" passed, "+(TestSuite.totaltests-TestSuite.passedtests)+" failed, "+TestSuite.totaltests+" total")
|
}
|
||||||
console.log("==============")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user