index.ts 1.0 KB
Newer Older
1 2 3 4 5
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

J
Joao Moreno 已提交
6
const path = require('path');
7 8
const testRunner = require('vscode/lib/testrunner');

J
Joao Moreno 已提交
9 10 11
const suite = 'Integration Emmet Tests';

const options: any = {
J
Joao Moreno 已提交
12 13
	ui: 'tdd',
	useColors: true,
14
	timeout: 60000
J
Joao Moreno 已提交
15 16 17 18 19 20 21 22 23 24 25 26 27 28
};

if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
	options.reporter = 'mocha-multi-reporters';
	options.reporterOptions = {
		reporterEnabled: 'spec, mocha-junit-reporter',
		mochaJunitReporterReporterOptions: {
			testsuitesTitle: `${suite} ${process.platform}`,
			mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
		}
	};
}

testRunner.configure(options);
29 30

export = testRunner;