Path: blob/main/extensions/configuration-editing/src/test/index.ts
3292 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import * as path from 'path';6import * as testRunner from '../../../../test/integration/electron/testrunner';78const options: import('mocha').MochaOptions = {9ui: 'tdd',10color: true,11timeout: 6000012};1314// These integration tests is being run in multiple environments (electron, web, remote)15// so we need to set the suite name based on the environment as the suite name is used16// for the test results file name17let suite = '';18if (process.env.VSCODE_BROWSER) {19suite = `${process.env.VSCODE_BROWSER} Browser Integration Configuration-Editing Tests`;20} else if (process.env.REMOTE_VSCODE) {21suite = 'Remote Integration Configuration-Editing Tests';22} else {23suite = 'Integration Configuration-Editing Tests';24}2526if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY || process.env.GITHUB_WORKSPACE) {27options.reporter = 'mocha-multi-reporters';28options.reporterOptions = {29reporterEnabled: 'spec, mocha-junit-reporter',30mochaJunitReporterReporterOptions: {31testsuitesTitle: `${suite} ${process.platform}`,32mochaFile: path.join(33process.env.BUILD_ARTIFACTSTAGINGDIRECTORY || process.env.GITHUB_WORKSPACE || __dirname,34`test-results/${process.platform}-${process.arch}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)35}36};37}3839testRunner.configure(options);4041export = testRunner;424344