forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.mocharc.js
More file actions
40 lines (32 loc) · 1.11 KB
/
Copy path.mocharc.js
File metadata and controls
40 lines (32 loc) · 1.11 KB
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
31
32
33
34
35
36
37
38
39
40
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
'use strict';
const testDriver = process.env.FLUID_TEST_DRIVER ? process.env.FLUID_TEST_DRIVER : 'local';
const packageDir = `${__dirname}/../..`;
const requiredModules = [
`node_modules/@fluidframework/mocha-test-setup`, // General mocha setup e.g. suppresses console.log
];
if (process.env.FLUID_TEST_LOGGER_PKG_PATH) {
// Inject implementation of getTestLogger
requiredModules.push(`${process.env.FLUID_TEST_LOGGER_PKG_PATH}`);
}
const config = {
exit: true,
recursive: true,
require: requiredModules,
'unhandled-rejections': 'strict',
};
if (process.env.FLUID_TEST_TIMEOUT !== undefined) {
config['timeout'] = process.env.FLUID_TEST_TIMEOUT;
}
if (process.env.FLUID_TEST_REPORT === '1') {
config['reporter'] = `xunit`;
config['reporter-options'] = [
// give the report file a unique name based on driver config
`output=${packageDir}/nyc/${testDriver}-junit-report.xml`,
`suiteName="dds tree - ${testDriver}"`,
];
}
module.exports = config;