.mocharc.cjs (755B)
1 /** 2 * @license 3 * Copyright 2020 Google Inc. 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 let timeout = process.platform === 'win32' ? 20_000 : 10_000; 8 if (!!process.env.DEBUGGER_ATTACHED) { 9 timeout = 0; 10 } 11 module.exports = { 12 logLevel: 'debug', 13 require: ['./test/build/mocha-utils.js', 'source-map-support/register'], 14 exit: !!process.env.CI, 15 retries: process.env.CI ? 3 : 0, 16 parallel: !!process.env.PARALLEL, 17 timeout: timeout, 18 reporter: process.env.CI ? 'spec' : 'dot', 19 // This should make mocha crash on uncaught errors. 20 // See https://github.com/mochajs/mocha/blob/master/docs/index.md#--allow-uncaught. 21 allowUncaught: true, 22 // See https://github.com/mochajs/mocha/blob/master/docs/index.md#--async-only--a. 23 asyncOnly: true, 24 };