Add coverage for extension tests (#8961)

* wip

* Add code coverage files to all extensions

* Update vscodetestcover

* Update yarn.lock

* Update CMS yarn.lock

* Update vscodetestcover version
This commit is contained in:
Charles Gagnon
2020-01-28 07:23:45 -08:00
committed by GitHub
parent 136a1d8cee
commit 2dfd75352f
44 changed files with 27989 additions and 4618 deletions

View File

@@ -1,6 +1,8 @@
out/test/** coverage
src/** out/test
src
.gitignore .gitignore
coverConfig.json
tsconfig.json tsconfig.json
InstallSsmsMin.bat InstallSsmsMin.bat
cgmanifest.json cgmanifest.json

View File

@@ -0,0 +1,19 @@
{
"enabled": true,
"relativeSourcePath": "..",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": [
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
],
"verbose": false,
"remapOptions": {
"basePath": "..",
"useAbsolutePaths": true
}
}

View File

@@ -75,11 +75,16 @@
"vscode-nls": "^3.2.1" "vscode-nls": "^3.2.1"
}, },
"devDependencies": { "devDependencies": {
"@types/mocha": "^5.2.5",
"@types/node": "^12.11.7", "@types/node": "^12.11.7",
"mocha": "^5.2.0",
"mocha-junit-reporter": "^1.17.0", "mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",
"should": "^13.2.3", "should": "^13.2.3",
"vscode": "^1.1.36" "vscodetestcover": "github:corivera/vscodetestcover#1.0.4"
},
"resolutions": {
"esprima": "^4.0.0"
}, },
"__metadata": { "__metadata": {
"id": "41", "id": "41",

View File

@@ -3,12 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
const path = require('path'); import * as path from 'path';
const testRunner = require('vscode/lib/testrunner'); const testRunner = require('vscodetestcover');
const suite = 'admin-tool-ext-win Extension Tests'; const suite = 'admin-tool-ext-win Extension Tests';
const options: any = { const mochaOptions: any = {
ui: 'bdd', ui: 'bdd',
useColors: true, useColors: true,
timeout: 10000 timeout: 10000
@@ -16,25 +16,25 @@ const options: any = {
// set relevant mocha options from the environment // set relevant mocha options from the environment
if (process.env.ADS_TEST_GREP) { if (process.env.ADS_TEST_GREP) {
options.grep = process.env.ADS_TEST_GREP; mochaOptions.grep = process.env.ADS_TEST_GREP;
console.log(`setting options.grep to: ${options.grep}`); console.log(`setting options.grep to: ${mochaOptions.grep}`);
} }
if (process.env.ADS_TEST_INVERT_GREP) { if (process.env.ADS_TEST_INVERT_GREP) {
options.invert = parseInt(process.env.ADS_TEST_INVERT_GREP); mochaOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP);
console.log(`setting options.invert to: ${options.invert}`); console.log(`setting options.invert to: ${mochaOptions.invert}`);
} }
if (process.env.ADS_TEST_TIMEOUT) { if (process.env.ADS_TEST_TIMEOUT) {
options.timeout = parseInt(process.env.ADS_TEST_TIMEOUT); mochaOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT);
console.log(`setting options.timeout to: ${options.timeout}`); console.log(`setting options.timeout to: ${mochaOptions.timeout}`);
} }
if (process.env.ADS_TEST_RETRIES) { if (process.env.ADS_TEST_RETRIES) {
options.retries = parseInt(process.env.ADS_TEST_RETRIES); mochaOptions.retries = parseInt(process.env.ADS_TEST_RETRIES);
console.log(`setting options.retries to: ${options.retries}`); console.log(`setting options.retries to: ${mochaOptions.retries}`);
} }
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) { if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
options.reporter = 'mocha-multi-reporters'; mochaOptions.reporter = 'mocha-multi-reporters';
options.reporterOptions = { mochaOptions.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter', reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: { mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`, testsuitesTitle: `${suite} ${process.platform}`,
@@ -43,6 +43,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
}; };
} }
testRunner.configure(options); testRunner.configure(mochaOptions, { coverConfig: '../../coverConfig.json' });
export = testRunner; export = testRunner;

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,5 @@
src/** src
out/test/** out/test
tsconfig.json tsconfig.json
coverage
coverConfig.json

View File

@@ -0,0 +1,19 @@
{
"enabled": true,
"relativeSourcePath": "..",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": [
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
],
"verbose": false,
"remapOptions": {
"basePath": "..",
"useAbsolutePaths": true
}
}

View File

@@ -88,7 +88,10 @@
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",
"should": "^13.2.1", "should": "^13.2.1",
"typemoq": "^2.1.0", "typemoq": "^2.1.0",
"vscode": "^1.1.36" "vscodetestcover": "github:corivera/vscodetestcover#1.0.4"
},
"resolutions": {
"esprima": "^4.0.0"
}, },
"__metadata": { "__metadata": {
"id": "10", "id": "10",

View File

@@ -3,12 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
const path = require('path'); import * as path from 'path';
const testRunner = require('vscode/lib/testrunner'); const testRunner = require('vscodetestcover');
const suite = 'agent Extension Tests'; const suite = 'agent Extension Tests';
const options: any = { const mochaOptions: any = {
ui: 'bdd', ui: 'bdd',
useColors: true, useColors: true,
timeout: 10000 timeout: 10000
@@ -16,25 +16,25 @@ const options: any = {
// set relevant mocha options from the environment // set relevant mocha options from the environment
if (process.env.ADS_TEST_GREP) { if (process.env.ADS_TEST_GREP) {
options.grep = process.env.ADS_TEST_GREP; mochaOptions.grep = process.env.ADS_TEST_GREP;
console.log(`setting options.grep to: ${options.grep}`); console.log(`setting options.grep to: ${mochaOptions.grep}`);
} }
if (process.env.ADS_TEST_INVERT_GREP) { if (process.env.ADS_TEST_INVERT_GREP) {
options.invert = parseInt(process.env.ADS_TEST_INVERT_GREP); mochaOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP);
console.log(`setting options.invert to: ${options.invert}`); console.log(`setting options.invert to: ${mochaOptions.invert}`);
} }
if (process.env.ADS_TEST_TIMEOUT) { if (process.env.ADS_TEST_TIMEOUT) {
options.timeout = parseInt(process.env.ADS_TEST_TIMEOUT); mochaOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT);
console.log(`setting options.timeout to: ${options.timeout}`); console.log(`setting options.timeout to: ${mochaOptions.timeout}`);
} }
if (process.env.ADS_TEST_RETRIES) { if (process.env.ADS_TEST_RETRIES) {
options.retries = parseInt(process.env.ADS_TEST_RETRIES); mochaOptions.retries = parseInt(process.env.ADS_TEST_RETRIES);
console.log(`setting options.retries to: ${options.retries}`); console.log(`setting options.retries to: ${mochaOptions.retries}`);
} }
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) { if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
options.reporter = 'mocha-multi-reporters'; mochaOptions.reporter = 'mocha-multi-reporters';
options.reporterOptions = { mochaOptions.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter', reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: { mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`, testsuitesTitle: `${suite} ${process.platform}`,
@@ -43,6 +43,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
}; };
} }
testRunner.configure(options); testRunner.configure(mochaOptions, { coverConfig: '../../coverConfig.json' });
export = testRunner; export = testRunner;

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,7 @@
src/** src
out/** out
tsconfig.json tsconfig.json
extension.webpack.config.js extension.webpack.config.js
yarn.lock yarn.lock
coverage
coverConfig.json

View File

@@ -0,0 +1,19 @@
{
"enabled": true,
"relativeSourcePath": "..",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": [
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
],
"verbose": false,
"remapOptions": {
"basePath": "..",
"useAbsolutePaths": true
}
}

View File

@@ -193,6 +193,9 @@
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",
"should": "^13.2.1", "should": "^13.2.1",
"typemoq": "^2.1.0", "typemoq": "^2.1.0",
"vscode": "1.1.26" "vscodetestcover": "github:corivera/vscodetestcover#1.0.4"
},
"resolutions": {
"esprima": "^4.0.0"
} }
} }

View File

@@ -3,12 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
const path = require('path'); import * as path from 'path';
const testRunner = require('vscode/lib/testrunner'); const testRunner = require('vscodetestcover');
const suite = 'azurecore Extension Tests'; const suite = 'azurecore Extension Tests';
const options: any = { const mochaOptions: any = {
ui: 'bdd', ui: 'bdd',
useColors: true, useColors: true,
timeout: 10000 timeout: 10000
@@ -16,25 +16,25 @@ const options: any = {
// set relevant mocha options from the environment // set relevant mocha options from the environment
if (process.env.ADS_TEST_GREP) { if (process.env.ADS_TEST_GREP) {
options.grep = process.env.ADS_TEST_GREP; mochaOptions.grep = process.env.ADS_TEST_GREP;
console.log(`setting options.grep to: ${options.grep}`); console.log(`setting options.grep to: ${mochaOptions.grep}`);
} }
if (process.env.ADS_TEST_INVERT_GREP) { if (process.env.ADS_TEST_INVERT_GREP) {
options.invert = parseInt(process.env.ADS_TEST_INVERT_GREP); mochaOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP);
console.log(`setting options.invert to: ${options.invert}`); console.log(`setting options.invert to: ${mochaOptions.invert}`);
} }
if (process.env.ADS_TEST_TIMEOUT) { if (process.env.ADS_TEST_TIMEOUT) {
options.timeout = parseInt(process.env.ADS_TEST_TIMEOUT); mochaOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT);
console.log(`setting options.timeout to: ${options.timeout}`); console.log(`setting options.timeout to: ${mochaOptions.timeout}`);
} }
if (process.env.ADS_TEST_RETRIES) { if (process.env.ADS_TEST_RETRIES) {
options.retries = parseInt(process.env.ADS_TEST_RETRIES); mochaOptions.retries = parseInt(process.env.ADS_TEST_RETRIES);
console.log(`setting options.retries to: ${options.retries}`); console.log(`setting options.retries to: ${mochaOptions.retries}`);
} }
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) { if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
options.reporter = 'mocha-multi-reporters'; mochaOptions.reporter = 'mocha-multi-reporters';
options.reporterOptions = { mochaOptions.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter', reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: { mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`, testsuitesTitle: `${suite} ${process.platform}`,
@@ -43,6 +43,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
}; };
} }
testRunner.configure(options); testRunner.configure(mochaOptions, { coverConfig: '../../coverConfig.json' });
export = testRunner; export = testRunner;

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,5 @@
out/test/** out/test
src/** src
tsconfig.json tsconfig.json
coverage
coverConfig.json

View File

@@ -0,0 +1,19 @@
{
"enabled": true,
"relativeSourcePath": "..",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": [
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
],
"verbose": false,
"remapOptions": {
"basePath": "..",
"useAbsolutePaths": true
}
}

View File

@@ -638,9 +638,12 @@
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",
"mocha": "^5.2.0", "mocha": "^5.2.0",
"should": "^13.2.1", "should": "^13.2.1",
"vscode": "^1.1.26", "vscodetestcover": "github:corivera/vscodetestcover#1.0.4",
"typemoq": "^2.1.0" "typemoq": "^2.1.0"
}, },
"resolutions": {
"esprima": "^4.0.0"
},
"__metadata": { "__metadata": {
"id": "40", "id": "40",
"publisherDisplayName": "Microsoft", "publisherDisplayName": "Microsoft",

View File

@@ -3,12 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
const path = require('path'); import * as path from 'path';
const testRunner = require('vscode/lib/testrunner'); const testRunner = require('vscodetestcover');
const suite = 'cms Extension Tests'; const suite = 'cms Extension Tests';
const options: any = { const mochaOptions: any = {
ui: 'bdd', ui: 'bdd',
useColors: true, useColors: true,
timeout: 10000 timeout: 10000
@@ -16,25 +16,25 @@ const options: any = {
// set relevant mocha options from the environment // set relevant mocha options from the environment
if (process.env.ADS_TEST_GREP) { if (process.env.ADS_TEST_GREP) {
options.grep = process.env.ADS_TEST_GREP; mochaOptions.grep = process.env.ADS_TEST_GREP;
console.log(`setting options.grep to: ${options.grep}`); console.log(`setting options.grep to: ${mochaOptions.grep}`);
} }
if (process.env.ADS_TEST_INVERT_GREP) { if (process.env.ADS_TEST_INVERT_GREP) {
options.invert = parseInt(process.env.ADS_TEST_INVERT_GREP); mochaOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP);
console.log(`setting options.invert to: ${options.invert}`); console.log(`setting options.invert to: ${mochaOptions.invert}`);
} }
if (process.env.ADS_TEST_TIMEOUT) { if (process.env.ADS_TEST_TIMEOUT) {
options.timeout = parseInt(process.env.ADS_TEST_TIMEOUT); mochaOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT);
console.log(`setting options.timeout to: ${options.timeout}`); console.log(`setting options.timeout to: ${mochaOptions.timeout}`);
} }
if (process.env.ADS_TEST_RETRIES) { if (process.env.ADS_TEST_RETRIES) {
options.retries = parseInt(process.env.ADS_TEST_RETRIES); mochaOptions.retries = parseInt(process.env.ADS_TEST_RETRIES);
console.log(`setting options.retries to: ${options.retries}`); console.log(`setting options.retries to: ${mochaOptions.retries}`);
} }
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) { if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
options.reporter = 'mocha-multi-reporters'; mochaOptions.reporter = 'mocha-multi-reporters';
options.reporterOptions = { mochaOptions.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter', reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: { mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`, testsuitesTitle: `${suite} ${process.platform}`,
@@ -43,6 +43,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
}; };
} }
testRunner.configure(options); testRunner.configure(mochaOptions, { coverConfig: '../../coverConfig.json' });
export = testRunner; export = testRunner;

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,5 @@
coverage/** coverage
coverageConfig.json coverageConfig.json
src/** src
out/test
tsconfig.json tsconfig.json

View File

@@ -0,0 +1,19 @@
{
"enabled": true,
"relativeSourcePath": "..",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": [
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
],
"verbose": false,
"remapOptions": {
"basePath": "..",
"useAbsolutePaths": true
}
}

View File

@@ -62,7 +62,10 @@
"mocha-junit-reporter": "^1.17.0", "mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",
"should": "^13.2.1", "should": "^13.2.1",
"vscode": "^1.1.36" "vscodetestcover": "github:corivera/vscodetestcover#1.0.4"
},
"resolutions": {
"esprima": "^4.0.0"
}, },
"__metadata": { "__metadata": {
"id": "33", "id": "33",

View File

@@ -3,12 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
const path = require('path'); import * as path from 'path';
const testRunner = require('vscode/lib/testrunner'); const testRunner = require('vscodetestcover');
const suite = 'dacpac Extension Tests'; const suite = 'dacpac Extension Tests';
const testOptions: any = { const mochaOptions: any = {
ui: 'bdd', ui: 'bdd',
useColors: true, useColors: true,
timeout: 10000 timeout: 10000
@@ -16,25 +16,25 @@ const testOptions: any = {
// set relevant mocha options from the environment // set relevant mocha options from the environment
if (process.env.ADS_TEST_GREP) { if (process.env.ADS_TEST_GREP) {
testOptions.grep = process.env.ADS_TEST_GREP; mochaOptions.grep = process.env.ADS_TEST_GREP;
console.log(`setting options.grep to: ${testOptions.grep}`); console.log(`setting options.grep to: ${mochaOptions.grep}`);
} }
if (process.env.ADS_TEST_INVERT_GREP) { if (process.env.ADS_TEST_INVERT_GREP) {
testOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP); mochaOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP);
console.log(`setting options.invert to: ${testOptions.invert}`); console.log(`setting options.invert to: ${mochaOptions.invert}`);
} }
if (process.env.ADS_TEST_TIMEOUT) { if (process.env.ADS_TEST_TIMEOUT) {
testOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT); mochaOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT);
console.log(`setting options.timeout to: ${testOptions.timeout}`); console.log(`setting options.timeout to: ${mochaOptions.timeout}`);
} }
if (process.env.ADS_TEST_RETRIES) { if (process.env.ADS_TEST_RETRIES) {
testOptions.retries = parseInt(process.env.ADS_TEST_RETRIES); mochaOptions.retries = parseInt(process.env.ADS_TEST_RETRIES);
console.log(`setting options.retries to: ${testOptions.retries}`); console.log(`setting options.retries to: ${mochaOptions.retries}`);
} }
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) { if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
testOptions.reporter = 'mocha-multi-reporters'; mochaOptions.reporter = 'mocha-multi-reporters';
testOptions.reporterOptions = { mochaOptions.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter', reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: { mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`, testsuitesTitle: `${suite} ${process.platform}`,
@@ -43,6 +43,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
}; };
} }
testRunner.configure(testOptions); testRunner.configure(mochaOptions, { coverConfig: '../../coverConfig.json' });
export = testRunner; export = testRunner;

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,7 @@
src/** src
tsconfig.json tsconfig.json
python/** python
r_packages/** r_packages
out/test/** out/test
coverage
coverConfig.json

View File

@@ -0,0 +1,19 @@
{
"enabled": true,
"relativeSourcePath": "..",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": [
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
],
"verbose": false,
"remapOptions": {
"basePath": "..",
"useAbsolutePaths": true
}
}

View File

@@ -110,6 +110,9 @@
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",
"should": "^13.2.1", "should": "^13.2.1",
"typemoq": "^2.1.0", "typemoq": "^2.1.0",
"vscode": "1.1.26" "vscodetestcover": "github:corivera/vscodetestcover#1.0.4"
},
"resolutions": {
"esprima": "^4.0.0"
} }
} }

View File

@@ -3,12 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
const path = require('path'); import * as path from 'path';
const testRunner = require('vscode/lib/testrunner'); const testRunner = require('vscodetestcover');
const suite = 'machine learning Extension Tests'; const suite = 'machine learning Extension Tests';
const options: any = { const mochaOptions: any = {
ui: 'bdd', ui: 'bdd',
useColors: true, useColors: true,
timeout: 10000 timeout: 10000
@@ -16,25 +16,25 @@ const options: any = {
// set relevant mocha options from the environment // set relevant mocha options from the environment
if (process.env.ADS_TEST_GREP) { if (process.env.ADS_TEST_GREP) {
options.grep = process.env.ADS_TEST_GREP; mochaOptions.grep = process.env.ADS_TEST_GREP;
console.log(`setting options.grep to: ${options.grep}`); console.log(`setting options.grep to: ${mochaOptions.grep}`);
} }
if (process.env.ADS_TEST_INVERT_GREP) { if (process.env.ADS_TEST_INVERT_GREP) {
options.invert = parseInt(process.env.ADS_TEST_INVERT_GREP); mochaOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP);
console.log(`setting options.invert to: ${options.invert}`); console.log(`setting options.invert to: ${mochaOptions.invert}`);
} }
if (process.env.ADS_TEST_TIMEOUT) { if (process.env.ADS_TEST_TIMEOUT) {
options.timeout = parseInt(process.env.ADS_TEST_TIMEOUT); mochaOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT);
console.log(`setting options.timeout to: ${options.timeout}`); console.log(`setting options.timeout to: ${mochaOptions.timeout}`);
} }
if (process.env.ADS_TEST_RETRIES) { if (process.env.ADS_TEST_RETRIES) {
options.retries = parseInt(process.env.ADS_TEST_RETRIES); mochaOptions.retries = parseInt(process.env.ADS_TEST_RETRIES);
console.log(`setting options.retries to: ${options.retries}`); console.log(`setting options.retries to: ${mochaOptions.retries}`);
} }
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) { if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
options.reporter = 'mocha-multi-reporters'; mochaOptions.reporter = 'mocha-multi-reporters';
options.reporterOptions = { mochaOptions.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter', reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: { mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`, testsuitesTitle: `${suite} ${process.platform}`,
@@ -43,6 +43,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
}; };
} }
testRunner.configure(options); testRunner.configure(mochaOptions, { coverConfig: '../../coverConfig.json' });
export = testRunner; export = testRunner;

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,8 @@
jupyter_config/** jupyter_config
src/** src
out/** out
tsconfig.json tsconfig.json
extension.webpack.config.js extension.webpack.config.js
yarn.lock yarn.lock
coverage
coverConfig.json

View File

@@ -0,0 +1,19 @@
{
"enabled": true,
"relativeSourcePath": "..",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": [
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
],
"verbose": false,
"remapOptions": {
"basePath": "..",
"useAbsolutePaths": true
}
}

View File

@@ -484,7 +484,10 @@
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",
"should": "^13.2.3", "should": "^13.2.3",
"typemoq": "^2.1.0", "typemoq": "^2.1.0",
"vscode": "1.1.5" "vscodetestcover": "github:corivera/vscodetestcover#1.0.4"
},
"resolutions": {
"esprima": "^4.0.0"
}, },
"enableProposedApi": true "enableProposedApi": true
} }

View File

@@ -3,12 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
const path = require('path'); import * as path from 'path';
const testRunner = require('vscode/lib/testrunner'); const testRunner = require('vscodetestcover');
const suite = 'notebook Extension Tests'; const suite = 'notebook Extension Tests';
const options: any = { const mochaOptions: any = {
ui: 'bdd', ui: 'bdd',
useColors: true, useColors: true,
timeout: 10000 timeout: 10000
@@ -16,25 +16,25 @@ const options: any = {
// set relevant mocha options from the environment // set relevant mocha options from the environment
if (process.env.ADS_TEST_GREP) { if (process.env.ADS_TEST_GREP) {
options.grep = process.env.ADS_TEST_GREP; mochaOptions.grep = process.env.ADS_TEST_GREP;
console.log(`setting options.grep to: ${options.grep}`); console.log(`setting options.grep to: ${mochaOptions.grep}`);
} }
if (process.env.ADS_TEST_INVERT_GREP) { if (process.env.ADS_TEST_INVERT_GREP) {
options.invert = parseInt(process.env.ADS_TEST_INVERT_GREP); mochaOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP);
console.log(`setting options.invert to: ${options.invert}`); console.log(`setting options.invert to: ${mochaOptions.invert}`);
} }
if (process.env.ADS_TEST_TIMEOUT) { if (process.env.ADS_TEST_TIMEOUT) {
options.timeout = parseInt(process.env.ADS_TEST_TIMEOUT); mochaOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT);
console.log(`setting options.timeout to: ${options.timeout}`); console.log(`setting options.timeout to: ${mochaOptions.timeout}`);
} }
if (process.env.ADS_TEST_RETRIES) { if (process.env.ADS_TEST_RETRIES) {
options.retries = parseInt(process.env.ADS_TEST_RETRIES); mochaOptions.retries = parseInt(process.env.ADS_TEST_RETRIES);
console.log(`setting options.retries to: ${options.retries}`); console.log(`setting options.retries to: ${mochaOptions.retries}`);
} }
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) { if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
options.reporter = 'mocha-multi-reporters'; mochaOptions.reporter = 'mocha-multi-reporters';
options.reporterOptions = { mochaOptions.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter', reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: { mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`, testsuitesTitle: `${suite} ${process.platform}`,
@@ -43,6 +43,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
}; };
} }
testRunner.configure(options); testRunner.configure(mochaOptions, { coverConfig: '../../coverConfig.json' });
export = testRunner; export = testRunner;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
{
"enabled": true,
"relativeSourcePath": "..",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": [
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
],
"verbose": false,
"remapOptions": {
"basePath": "..",
"useAbsolutePaths": true
}
}

View File

@@ -356,10 +356,15 @@
"yamljs": "^0.3.0" "yamljs": "^0.3.0"
}, },
"devDependencies": { "devDependencies": {
"@types/mocha": "^5.2.5",
"@types/yamljs": "0.2.30", "@types/yamljs": "0.2.30",
"mocha": "^5.2.0",
"mocha-junit-reporter": "^1.17.0", "mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",
"typemoq": "^2.1.0", "typemoq": "^2.1.0",
"vscode": "^1.1.26" "vscodetestcover": "github:corivera/vscodetestcover#1.0.4"
},
"resolutions": {
"esprima": "^4.0.0"
} }
} }

View File

@@ -3,12 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
const path = require('path'); import * as path from 'path';
const testRunner = require('vscode/lib/testrunner'); const testRunner = require('vscodetestcover');
const suite = 'resource-deployment Extension Tests'; const suite = 'resource-deployment Extension Tests';
const testOptions: any = { const mochaOptions: any = {
ui: 'tdd', ui: 'tdd',
useColors: true, useColors: true,
timeout: 10000 timeout: 10000
@@ -16,25 +16,25 @@ const testOptions: any = {
// set relevant mocha options from the environment // set relevant mocha options from the environment
if (process.env.ADS_TEST_GREP) { if (process.env.ADS_TEST_GREP) {
testOptions.grep = process.env.ADS_TEST_GREP; mochaOptions.grep = process.env.ADS_TEST_GREP;
console.log(`setting options.grep to: ${testOptions.grep}`); console.log(`setting options.grep to: ${mochaOptions.grep}`);
} }
if (process.env.ADS_TEST_INVERT_GREP) { if (process.env.ADS_TEST_INVERT_GREP) {
testOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP); mochaOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP);
console.log(`setting options.invert to: ${testOptions.invert}`); console.log(`setting options.invert to: ${mochaOptions.invert}`);
} }
if (process.env.ADS_TEST_TIMEOUT) { if (process.env.ADS_TEST_TIMEOUT) {
testOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT); mochaOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT);
console.log(`setting options.timeout to: ${testOptions.timeout}`); console.log(`setting options.timeout to: ${mochaOptions.timeout}`);
} }
if (process.env.ADS_TEST_RETRIES) { if (process.env.ADS_TEST_RETRIES) {
testOptions.retries = parseInt(process.env.ADS_TEST_RETRIES); mochaOptions.retries = parseInt(process.env.ADS_TEST_RETRIES);
console.log(`setting options.retries to: ${testOptions.retries}`); console.log(`setting options.retries to: ${mochaOptions.retries}`);
} }
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) { if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
testOptions.reporter = 'mocha-multi-reporters'; mochaOptions.reporter = 'mocha-multi-reporters';
testOptions.reporterOptions = { mochaOptions.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter', reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: { mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`, testsuitesTitle: `${suite} ${process.platform}`,
@@ -43,6 +43,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
}; };
} }
testRunner.configure(testOptions); testRunner.configure(mochaOptions, { coverConfig: '../../coverConfig.json' });
export = testRunner; export = testRunner;

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,5 @@
src/** src
out/test
tsconfig.json tsconfig.json
coverage
coverConfig.json

View File

@@ -0,0 +1,19 @@
{
"enabled": true,
"relativeSourcePath": "..",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": [
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
],
"verbose": false,
"remapOptions": {
"basePath": "..",
"useAbsolutePaths": true
}
}

View File

@@ -70,7 +70,10 @@
"mocha-multi-reporters": "^1.1.7", "mocha-multi-reporters": "^1.1.7",
"should": "^13.2.1", "should": "^13.2.1",
"typemoq": "^2.1.0", "typemoq": "^2.1.0",
"vscode": "1.1.26" "vscodetestcover": "github:corivera/vscodetestcover#1.0.4"
},
"resolutions": {
"esprima": "^4.0.0"
}, },
"__metadata": { "__metadata": {
"id": "37", "id": "37",

View File

@@ -3,12 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
const path = require('path'); import * as path from 'path';
const testRunner = require('vscode/lib/testrunner'); const testRunner = require('vscodetestcover');
const suite = 'schema-compare Extension Tests'; const suite = 'schema-compare Extension Tests';
const options: any = { const mochaOptions: any = {
ui: 'bdd', ui: 'bdd',
useColors: true, useColors: true,
timeout: 10000 timeout: 10000
@@ -16,25 +16,25 @@ const options: any = {
// set relevant mocha options from the environment // set relevant mocha options from the environment
if (process.env.ADS_TEST_GREP) { if (process.env.ADS_TEST_GREP) {
options.grep = process.env.ADS_TEST_GREP; mochaOptions.grep = process.env.ADS_TEST_GREP;
console.log(`setting options.grep to: ${options.grep}`); console.log(`setting options.grep to: ${mochaOptions.grep}`);
} }
if (process.env.ADS_TEST_INVERT_GREP) { if (process.env.ADS_TEST_INVERT_GREP) {
options.invert = parseInt(process.env.ADS_TEST_INVERT_GREP); mochaOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP);
console.log(`setting options.invert to: ${options.invert}`); console.log(`setting options.invert to: ${mochaOptions.invert}`);
} }
if (process.env.ADS_TEST_TIMEOUT) { if (process.env.ADS_TEST_TIMEOUT) {
options.timeout = parseInt(process.env.ADS_TEST_TIMEOUT); mochaOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT);
console.log(`setting options.timeout to: ${options.timeout}`); console.log(`setting options.timeout to: ${mochaOptions.timeout}`);
} }
if (process.env.ADS_TEST_RETRIES) { if (process.env.ADS_TEST_RETRIES) {
options.retries = parseInt(process.env.ADS_TEST_RETRIES); mochaOptions.retries = parseInt(process.env.ADS_TEST_RETRIES);
console.log(`setting options.retries to: ${options.retries}`); console.log(`setting options.retries to: ${mochaOptions.retries}`);
} }
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) { if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
options.reporter = 'mocha-multi-reporters'; mochaOptions.reporter = 'mocha-multi-reporters';
options.reporterOptions = { mochaOptions.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter', reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: { mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`, testsuitesTitle: `${suite} ${process.platform}`,
@@ -43,6 +43,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
}; };
} }
testRunner.configure(options); testRunner.configure(mochaOptions, { coverConfig: '../../coverConfig.json' });
export = testRunner; export = testRunner;

File diff suppressed because it is too large Load Diff