diff options
Diffstat (limited to 'runtime/js/40_testing.js')
-rw-r--r-- | runtime/js/40_testing.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js index 617df22d4..4e7c231b2 100644 --- a/runtime/js/40_testing.js +++ b/runtime/js/40_testing.js @@ -228,15 +228,19 @@ finishing test case.`; } async function runTests({ - disableLog = false, filter = null, shuffle = null, } = {}) { const origin = getTestOrigin(); const originalConsole = globalThis.console; - if (disableLog) { - globalThis.console = new Console(() => {}); - } + + globalThis.console = new Console((line) => { + dispatchTestEvent({ + output: { + console: line, + }, + }); + }); const only = ArrayPrototypeFilter(tests, (test) => test.only); const filtered = ArrayPrototypeFilter( @@ -286,9 +290,7 @@ finishing test case.`; dispatchTestEvent({ result: [description, result, elapsed] }); } - if (disableLog) { - globalThis.console = originalConsole; - } + globalThis.console = originalConsole; } window.__bootstrap.internals = { |