mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add pipeline args for testing (#7028)
* add pipeline args for testing * fix test publish step * simplify some testing code * change coverage reporters * fix coverage reports
This commit is contained in:
@@ -12,15 +12,12 @@ const iLibSourceMaps = require('istanbul-lib-source-maps');
|
||||
const iLibReport = require('istanbul-lib-report');
|
||||
const iReports = require('istanbul-reports');
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
var SQL_TEST_GLOB = '**/test/**/*.test.js|**/sqltest/**/*.test.jss';
|
||||
|
||||
const REPO_PATH = toUpperDriveLetter(path.join(__dirname, '..'));
|
||||
|
||||
exports.initialize = function (loaderConfig) {
|
||||
const instrumenter = iLibInstrument.createInstrumenter();
|
||||
loaderConfig.nodeInstrumenter = function (contents, source) {
|
||||
if (minimatch(source, SQL_TEST_GLOB)) { // {{SQL CARBON EDIT}}
|
||||
if (minimatch(source, '**/test/**/*.test.js')) {
|
||||
// tests don't get instrumented
|
||||
return contents;
|
||||
}
|
||||
@@ -45,10 +42,9 @@ exports.createReport = function (isSingle) {
|
||||
Object.keys(transformed.map.data).forEach((file) => {
|
||||
const entry = transformed.map.data[file];
|
||||
const fixedPath = fixPath(entry.path);
|
||||
if (!fixedPath.includes('\\vs\\') && !fixedPath.includes('/vs/')) {
|
||||
entry.data.path = fixedPath;
|
||||
newData[fixedPath] = entry;
|
||||
}
|
||||
if (fixedPath.includes('\\vs\\') || fixedPath.includes('/vs/')) { return; } // {{SQL CARBON EDIT}} skip vscode files
|
||||
entry.data.path = fixedPath;
|
||||
newData[fixedPath] = entry;
|
||||
});
|
||||
transformed.map.data = newData;
|
||||
|
||||
@@ -64,6 +60,7 @@ exports.createReport = function (isSingle) {
|
||||
reports.push(iReports.create('json'));
|
||||
reports.push(iReports.create('lcov'));
|
||||
reports.push(iReports.create('html'));
|
||||
reports.push(iReports.create('cobertura')); // {{SQL CARBON EDIT}} add covertura
|
||||
}
|
||||
reports.forEach(report => tree.visit(report, context));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user