/**
* Who watches the watchers?
*/
-console.assert(failures.length === 0)
-console.assert(passes.length === 0)
+await suite('TEST RUNNER CHECK', async () => {
+ console.assert(failures.length === 0)
+ console.assert(passes.length === 0)
-await test('promise should pass', new Promise(resolve => { resolve('') }))
-console.assert(failures.some(call => /.*promise should pass.*/.test(call[0])) === false, `good promise errored`)
-console.assert(passes.some(call => /.*promise should pass.*/.test(call[0])) === true, `good promise not logged`)
+ await test('promise should pass', new Promise(resolve => { resolve('') }))
+ console.assert(failures.some(call => /.*promise should pass.*/.test(call[0])) === false, `good promise errored`)
+ console.assert(passes.some(call => /.*promise should pass.*/.test(call[0])) === true, `good promise not logged`)
-await test('promise should fail', new Promise((resolve, reject) => { reject('FAILURE EXPECTED HERE') }))
-console.assert(failures.some(call => /.*promise should fail.*/.test(call[0])) === true, `bad promise not errored`)
-console.assert(passes.some(call => /.*promise should fail.*/.test(call[0])) === false, 'bad promise logged')
+ await test('promise should fail', new Promise((resolve, reject) => { reject('FAILURE EXPECTED HERE') }))
+ console.assert(failures.some(call => /.*promise should fail.*/.test(call[0])) === true, `bad promise not errored`)
+ console.assert(passes.some(call => /.*promise should fail.*/.test(call[0])) === false, 'bad promise logged')
-await test('async should pass', async () => { })
-console.assert(failures.some(call => /.*async should pass.*/.test(call[0])) === false, 'good async errored')
-console.assert(passes.some(call => /.*async should pass.*/.test(call[0])) === true, 'good async not logged')
+ await test('async should pass', async () => { })
+ console.assert(failures.some(call => /.*async should pass.*/.test(call[0])) === false, 'good async errored')
+ console.assert(passes.some(call => /.*async should pass.*/.test(call[0])) === true, 'good async not logged')
-await test('async should fail', async () => { throw new Error('FAILURE EXPECTED HERE') })
-console.assert(failures.some(call => /.*async should fail.*/.test(call[0])) === true, 'bad async not errored')
-console.assert(passes.some(call => /.*async should fail.*/.test(call[0])) === false, 'bad async logged')
+ await test('async should fail', async () => { throw new Error('FAILURE EXPECTED HERE') })
+ console.assert(failures.some(call => /.*async should fail.*/.test(call[0])) === true, 'bad async not errored')
+ console.assert(passes.some(call => /.*async should fail.*/.test(call[0])) === false, 'bad async logged')
-await test('function should pass', () => { })
-console.assert(failures.some(call => /.*function should pass.*/.test(call[0])) === false, 'good function errored')
-console.assert(passes.some(call => /.*function should pass.*/.test(call[0])) === true, 'good function not logged')
+ await test('function should pass', () => { })
+ console.assert(failures.some(call => /.*function should pass.*/.test(call[0])) === false, 'good function errored')
+ console.assert(passes.some(call => /.*function should pass.*/.test(call[0])) === true, 'good function not logged')
-await test('function should fail', 'FAILURE EXPECTED HERE')
-console.assert(failures.some(call => /.*function should fail.*/.test(call[0])) === true, 'bad function not errored')
-console.assert(passes.some(call => /.*function should fail.*/.test(call[0])) === false, 'bad function logged')
+ await test('function should fail', 'FAILURE EXPECTED HERE')
+ console.assert(failures.some(call => /.*function should fail.*/.test(call[0])) === true, 'bad function not errored')
+ console.assert(passes.some(call => /.*function should fail.*/.test(call[0])) === false, 'bad function logged')
-console.log(`> TEST RUNNER CHECK DONE <`)
-console.log(` `)
+ console.log(`%cTEST RUNNER CHECK DONE`, 'font-weight:bold')
+})
export function skip (name) {
return new Promise(resolve => {