From: Chris Duncan Date: Fri, 20 Dec 2024 17:05:26 +0000 (-0800) Subject: Linting. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=dc072a74268a71413966f397de3ce740a3305e51;p=libnemo.git Linting. --- diff --git a/GLOBALS.mjs b/GLOBALS.mjs index 563ff8e..475d8de 100644 --- a/GLOBALS.mjs +++ b/GLOBALS.mjs @@ -58,7 +58,7 @@ await suite('TEST RUNNER CHECK', async () => { 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 () => { }) + 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') @@ -66,7 +66,7 @@ await suite('TEST RUNNER CHECK', async () => { 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', () => { }) + 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') @@ -77,10 +77,10 @@ await suite('TEST RUNNER CHECK', async () => { console.log(`%cTEST RUNNER CHECK DONE`, 'font-weight:bold') }) -export function skip (name) { +export function skip (name, fn) { return new Promise(resolve => { console.log(`%cSKIP `, 'color:blue', name) - resolve() + resolve(null) }) } @@ -91,7 +91,7 @@ export function suite (name, fn) { console.group(`%c${name}`, 'font-weight:bold') await fn console.groupEnd() - resolve() + resolve(null) }) }