From 97060b58f83cc6981b5353577fce8bd7c1050666 Mon Sep 17 00:00:00 2001 From: Fabian Wiles Date: Thu, 14 Mar 2019 07:33:24 +1300 Subject: [PATCH] fixup --- packages/jasmine/src/jasmine_runner.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/jasmine/src/jasmine_runner.js b/packages/jasmine/src/jasmine_runner.js index e83a923e47..3f1de3c53a 100644 --- a/packages/jasmine/src/jasmine_runner.js +++ b/packages/jasmine/src/jasmine_runner.js @@ -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'; } @@ -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(); @@ -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); } @@ -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); }