-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy path.mocharc.js
More file actions
30 lines (24 loc) · 952 Bytes
/
.mocharc.js
File metadata and controls
30 lines (24 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
const config = {
exit: true,
'node-option': 'unhandled-rejections=strict',
reporter: 'mocha-multi-reporters',
'reporter-option': [`configFile=${__dirname}/.mocha-multi-reporters.js`],
require: ['tsx'],
ui: 'tdd',
};
const cmd = process.env.npm_lifecycle_event;
if (['test:lsp-client'].includes(cmd) && !process.env.CI) {
config.parallel = true;
}
if (['test:lsp-client', 'reverseProxyTests'].includes(cmd) && process.env.CI) {
config.bail = true;
}
if (['test:lsp-client', 'test:lib-e2e'].includes(cmd) && process.env.CI) {
config.retries = 3;
}
module.exports = config;