]> git.codecow.com Git - libnemo.git/commitdiff
Display test suite name before running tests instead of after.
authorChris Duncan <chris@zoso.dev>
Wed, 20 Aug 2025 20:29:36 +0000 (13:29 -0700)
committerChris Duncan <chris@zoso.dev>
Wed, 20 Aug 2025 20:29:36 +0000 (13:29 -0700)
test/GLOBALS.mjs

index e93a7910ec1acb626c2e56cf384b9bd3e654c119..956b0f9b85c07ca21845bb075e98e78d1dcf7661 100644 (file)
@@ -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()
                })