Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/markdown-language-features/src/test/index.ts
3292 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import * as path from 'path';
7
import * as testRunner from '../../../../test/integration/electron/testrunner';
8
9
const options: import('mocha').MochaOptions = {
10
ui: 'tdd',
11
color: true,
12
timeout: 60000
13
};
14
15
// These integration tests is being run in multiple environments (electron, web, remote)
16
// so we need to set the suite name based on the environment as the suite name is used
17
// for the test results file name
18
let suite = '';
19
if (process.env.VSCODE_BROWSER) {
20
suite = `${process.env.VSCODE_BROWSER} Browser Integration Markdown Tests`;
21
} else if (process.env.REMOTE_VSCODE) {
22
suite = 'Remote Integration Markdown Tests';
23
} else {
24
suite = 'Integration Markdown Tests';
25
}
26
27
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY || process.env.GITHUB_WORKSPACE) {
28
options.reporter = 'mocha-multi-reporters';
29
options.reporterOptions = {
30
reporterEnabled: 'spec, mocha-junit-reporter',
31
mochaJunitReporterReporterOptions: {
32
testsuitesTitle: `${suite} ${process.platform}`,
33
mochaFile: path.join(
34
process.env.BUILD_ARTIFACTSTAGINGDIRECTORY || process.env.GITHUB_WORKSPACE || __dirname,
35
`test-results/${process.platform}-${process.arch}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
36
}
37
};
38
}
39
40
testRunner.configure(options);
41
42
export = testRunner;
43
44