mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Add lcov support
This commit is contained in:
parent
2a77b0eb53
commit
e055454adb
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
@ -15,5 +15,8 @@
|
|||
"extensions/**/out/**": true
|
||||
},
|
||||
"tslint.enable": true,
|
||||
"tslint.rulesDirectory": "build/lib/tslint"
|
||||
"tslint.rulesDirectory": "build/lib/tslint",
|
||||
"lcov.path": "./.build/coverage/lcov.info",
|
||||
"lcov.overwritingPath": "./.build/coverage-single/lcov.info",
|
||||
"lcov.watcherExec.windows": "${workspaceRoot}\\scripts\\test.bat --coverage --run ${file.replace(/^src/,'out').replace(/\\.ts$/,'.js')}"
|
||||
}
|
13
test/all.js
13
test/all.js
|
@ -176,8 +176,17 @@ function main() {
|
|||
var collector = new istanbul.Collector();
|
||||
collector.add(finalCoverage);
|
||||
|
||||
var reporter = new istanbul.Reporter(null, path.join(path.dirname(__dirname), '.build', 'coverage'));
|
||||
reporter.addAll(['json', 'lcov', 'html']);
|
||||
var coveragePath = path.join(path.dirname(__dirname), '.build', 'coverage');
|
||||
var reportTypes = [];
|
||||
if (argv.run) {
|
||||
// single file running
|
||||
coveragePath += '-single';
|
||||
reportTypes = ['lcovonly'];
|
||||
} else {
|
||||
reportTypes = ['json', 'lcov', 'html'];
|
||||
}
|
||||
var reporter = new istanbul.Reporter(null, coveragePath);
|
||||
reporter.addAll(reportTypes);
|
||||
reporter.write(collector, true, function () {});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue