UNPKG

@itwin/certa

Version:

A mocha-based integration test runner

23 lines 1.19 kB
"use strict"; /*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ // NB: This file is not a CommonJs module - it needs to run in the browser. Do not import or export modules here! // Redirect all console output back to the main (backend) process, if necessary if (typeof _CertaConsole !== "undefined") { const certaConsole = _CertaConsole; function forwardConsole(name) { const original = console[name]; console[name] = (...args) => { certaConsole(name, args); // Also preserve the original behavior. This way, test progress is reported in both the backend _and_ frontend processes. // This helps keep the output readable when debugging the frontend. original.apply(console, args); }; } forwardConsole("log"); forwardConsole("error"); forwardConsole("dir"); } //# sourceMappingURL=initLogging.js.map