mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Switch to vscodetestcover for running extension tests (#5458)
* Update vscode dependency (needed for test runner) to pull latest 1.x version * Update to use 1.1.5 instead * Undo change to vscode engine version * Switch to using vscodetestcover for running tests * Switch to cobertura output for coverage reports * Remove vscode dependency from profiler extension * Update yarn.lock with combined changes
This commit is contained in:
1
extensions/notebook/.gitignore
vendored
1
extensions/notebook/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
coverage/**
|
||||
jupyter_config/**
|
||||
@@ -1,6 +1,8 @@
|
||||
coverage/**
|
||||
jupyter_config/**
|
||||
src/**
|
||||
out/**
|
||||
coverageConfig.json
|
||||
tsconfig.json
|
||||
extension.webpack.config.js
|
||||
yarn.lock
|
||||
|
||||
18
extensions/notebook/coverageConfig.json
Normal file
18
extensions/notebook/coverageConfig.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"enabled": false,
|
||||
"relativeSourcePath": "..",
|
||||
"relativeCoverageDir": "../../coverage",
|
||||
"ignorePatterns": [
|
||||
"**/node_modules/**",
|
||||
"**/test/**"
|
||||
],
|
||||
"includePid": false,
|
||||
"reports": [
|
||||
"cobertura"
|
||||
],
|
||||
"verbose": false,
|
||||
"remapOptions": {
|
||||
"basePath": ".",
|
||||
"useAbsolutePaths": true
|
||||
}
|
||||
}
|
||||
@@ -349,7 +349,7 @@
|
||||
"mocha-junit-reporter": "^1.17.0",
|
||||
"mocha-multi-reporters": "^1.1.7",
|
||||
"typemoq": "^2.1.0",
|
||||
"vscode": "1.1.5"
|
||||
"vscodetestcover": "^1.0.2"
|
||||
},
|
||||
"enableProposedApi": true
|
||||
}
|
||||
|
||||
@@ -4,19 +4,23 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
const path = require('path');
|
||||
const testRunner = require('vscode/lib/testrunner');
|
||||
import * as testRunner from 'vscodetestcover';
|
||||
|
||||
const suite = 'Notebook Extension Integration Tests';
|
||||
|
||||
const options: any = {
|
||||
const testOptions: any = {
|
||||
ui: 'bdd',
|
||||
useColors: true,
|
||||
timeout: 600000
|
||||
};
|
||||
|
||||
const coverageConfig: any = {
|
||||
coverConfig: '../../coverageConfig.json'
|
||||
};
|
||||
|
||||
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||
options.reporter = 'mocha-multi-reporters';
|
||||
options.reporterOptions = {
|
||||
testOptions.reporter = 'mocha-multi-reporters';
|
||||
testOptions.reporterOptions = {
|
||||
reporterEnabled: 'spec, mocha-junit-reporter',
|
||||
mochaJunitReporterReporterOptions: {
|
||||
testsuitesTitle: `${suite} ${process.platform}`,
|
||||
@@ -25,6 +29,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||
};
|
||||
}
|
||||
|
||||
testRunner.configure(options);
|
||||
testRunner.configure(testOptions, coverageConfig);
|
||||
|
||||
export = testRunner;
|
||||
@@ -4,19 +4,24 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
const path = require('path');
|
||||
const testRunner = require('vscode/lib/testrunner');
|
||||
import * as testRunner from 'vscodetestcover';
|
||||
|
||||
const suite = 'Notebook Tests';
|
||||
|
||||
const options: any = {
|
||||
const testOptions: any = {
|
||||
ui: 'bdd',
|
||||
useColors: true,
|
||||
timeout: 600000
|
||||
timeout: 600000,
|
||||
};
|
||||
|
||||
// Coverage is currently disabled - the coverage runner isn't currently able to correctly parse es2018 javascript
|
||||
const coverageConfig: any = {
|
||||
coverConfig: '../../coverageConfig.json'
|
||||
};
|
||||
|
||||
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||
options.reporter = 'mocha-multi-reporters';
|
||||
options.reporterOptions = {
|
||||
testOptions.reporter = 'mocha-multi-reporters';
|
||||
testOptions.reporterOptions = {
|
||||
reporterEnabled: 'spec, mocha-junit-reporter',
|
||||
mochaJunitReporterReporterOptions: {
|
||||
testsuitesTitle: `${suite} ${process.platform}`,
|
||||
@@ -25,6 +30,6 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||
};
|
||||
}
|
||||
|
||||
testRunner.configure(options);
|
||||
testRunner.configure(testOptions, coverageConfig);
|
||||
|
||||
export = testRunner;
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user