From: Chris Duncan Date: Wed, 20 Aug 2025 20:29:36 +0000 (-0700) Subject: Display test suite name before running tests instead of after. X-Git-Tag: v0.10.5~41^2~32 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=2473d70be9c5fa4dddc025ba79d2dea27c984f25;p=libnemo.git Display test suite name before running tests instead of after. --- diff --git a/test/GLOBALS.mjs b/test/GLOBALS.mjs index e93a791..956b0f9 100644 --- a/test/GLOBALS.mjs +++ b/test/GLOBALS.mjs @@ -146,11 +146,11 @@ export const suite = NodeTestSuite != null console.groupEnd() return } - if (fn?.constructor?.name === 'AsyncFunction') fn = fn() - if (typeof fn === 'function') fn = new Promise(resolve => resolve(fn())) name === 'TEST RUNNER CHECK' ? console.groupCollapsed(`%c${name}`, 'font-weight:bold') : console.group(`%c${name}`, 'font-weight:bold') + if (fn?.constructor?.name === 'AsyncFunction') fn = fn() + if (typeof fn === 'function') fn = new Promise(resolve => resolve(fn())) await fn console.groupEnd() })