Skip to content

Commit 1dd16ab

Browse files
committed
setup git integration tests
1 parent c606dd9 commit 1dd16ab

3 files changed

Lines changed: 541 additions & 3 deletions

File tree

extensions/git/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1780,6 +1780,7 @@
17801780
"@types/mocha": "2.2.43",
17811781
"@types/node": "^12.11.7",
17821782
"@types/which": "^1.0.28",
1783-
"mocha": "^3.2.0"
1783+
"mocha": "^3.2.0",
1784+
"vscode": "^1.1.36"
17841785
}
17851786
}

extensions/git/src/test/index.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
const path = require('path');
7+
const testRunner = require('vscode/lib/testrunner');
8+
9+
const suite = 'Integration Git Tests';
10+
11+
const options: any = {
12+
ui: 'tdd',
13+
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
14+
timeout: 60000
15+
};
16+
17+
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
18+
options.reporter = 'mocha-multi-reporters';
19+
options.reporterOptions = {
20+
reporterEnabled: 'spec, mocha-junit-reporter',
21+
mochaJunitReporterReporterOptions: {
22+
testsuitesTitle: `${suite} ${process.platform}`,
23+
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
24+
}
25+
};
26+
}
27+
28+
testRunner.configure(options);
29+
30+
export = testRunner;

0 commit comments

Comments
 (0)