This commit is contained in:
parent
ab5efe4a33
commit
bd9de85ffc
2 changed files with 11 additions and 1 deletions
9
src/tests/index.js
Normal file
9
src/tests/index.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
const run = async function(){
|
||||
await AFRAME.utils.require({
|
||||
"test_util": "tests/util.js",
|
||||
"test_isoterminal":"tests/ISOTerminal.js"
|
||||
})
|
||||
console.test.run()
|
||||
}
|
||||
|
||||
run()
|
||||
|
|
@ -4,13 +4,14 @@ console.test = async (name,cb) => {
|
|||
let tests = console.test.tests = console.test.tests || {}
|
||||
tests[name] = tests[name] || []
|
||||
tests[name].push(cb)
|
||||
console.test.run = async () => {
|
||||
console.test.run = async (cb) => {
|
||||
for( let name in tests ){
|
||||
console.log("\x1b[34m\x1b[36;49m"+name+"\x1B[m")
|
||||
for( let test in tests[name] ){
|
||||
await tests[name][test]()
|
||||
}
|
||||
}
|
||||
if( cb ) cb()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue