blob: 7289a5f55692a8ced3f729799ae78874f7380136 [file] [log] [blame]
// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import path from 'node:path';
import {GEN_DIR} from '../../test/conductor/paths.js';
import {loadTests, TestConfig} from '../conductor/test_config.js';
module.exports = {
// This should make mocha crash on uncaught errors.
// See https://github.com/mochajs/mocha/blob/master/docs/index.md#--allow-uncaught.
allowUncaught : true,
require :
[
'source-map-support/register', 'chai/register-assert', 'sinon/pkg/sinon.js',
path.join(GEN_DIR, 'test', 'unit', 'mocha-hooks.js')
],
spec :
[
...loadTests(path.join(GEN_DIR, 'front_end'), 'foundation_tests.txt'),
...loadTests(path.join(GEN_DIR, 'mcp'), 'foundation_tests.txt')
],
timeout : TestConfig.debug ? 0 : 10_000,
reporter : path.join(path.dirname(__dirname), 'shared', 'mocha-resultsdb-reporter'),
retries : TestConfig.retries,
suiteName : 'unit',
slow : 1000, ...TestConfig.mochaGrep,
};