UNPKG

@itwin/certa

Version:

A mocha-based integration test runner

28 lines 1.32 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! ((config) => { const mochaOpts = config.mochaOptions; // This is essentially equivalent to `mocha.setup("bdd")`, except it works in both node and browser environments. mocha.ui("bdd"); mocha.suite.emit("pre-require", typeof (window) === "undefined" ? global : window, null, mocha); mocha.reporter(mochaOpts.reporter, mochaOpts.reporterOptions); // TODO: Come back and fix useColors to color mocha.color(true); mocha.timeout(mochaOpts.timeout); if (mochaOpts.fgrep) mocha.fgrep(mochaOpts.fgrep); if (mochaOpts.grep) mocha.grep(mochaOpts.grep); if (mochaOpts.invert) mocha.invert(); if (mochaOpts.forbidOnly) mocha.forbidOnly(); // Disable timeouts when debugging. if (config.debug) mocha.timeout(0); })(_CERTA_CONFIG); //# sourceMappingURL=initMocha.js.map