Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Wiles committed Mar 13, 2019
1 parent 4bc0930 commit 97060b5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/jasmine/src/jasmine_runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function main(args) {
// second is always a flag to enable coverage or not
const coverageArg = args[1];
let enableCoverage = false;
if(coverageArg.startsWith('--coverage')) {
if (coverageArg.startsWith('--coverage')) {
// Python has capital booleans
enableCoverage = coverageArg.split('=')[1] === 'True';
}
Expand Down Expand Up @@ -119,10 +119,10 @@ function main(args) {
// so we need to add it back
jrunner.configureDefaultReporter({});


let covExecutor;
let covDir;
if(enableCoverage) {
if (enableCoverage) {
covDir = path.join(process.env['TEST_TMPDIR'], String(crypto.randomBytes(4).readUInt32LE(0)));
covExecutor = new Execute({include: sourceFiles, exclude: []});
covExecutor.startProfiler();
Expand All @@ -131,10 +131,10 @@ function main(args) {
jrunner.onComplete((passed) => {
let exitCode = passed ? 0 : BAZEL_EXIT_TESTS_FAILED;
if (noSpecsFound) exitCode = BAZEL_EXIT_NO_TESTS_FOUND;
if(enableCoverage) {

if (enableCoverage) {
covExecutor.stopProfiler((err, data) => {
if(err) {
if (err) {
console.error(err);
process.exit(1);
}
Expand All @@ -152,11 +152,11 @@ function main(args) {
const report = new Report(covDir, ['text-summary']);
report.store(sourceCoverge);
report.generateReport();

process.exit(exitCode);
});
} else {
process.exit(exitCode);
process.exit(exitCode);
}


Expand Down

0 comments on commit 97060b5

Please sign in to comment.