Skip to content

Commit

Permalink
Fixed code cov report always printing
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdp committed Feb 13, 2024
1 parent d59ba42 commit 8f97e91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bsc-plugin/src/lib/rooibos/RooibosSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class RooibosSession {
prepareForTranspile(editor: AstEditor, program: Program, mockUtil: MockUtil) {
this.addTestRunnerMetadata(editor);
this.addLaunchHookToExistingMain(editor);

// Make sure to create the node files before running the global mock logic
// We realy on them in order to check the component scope for the global functions
for (let testSuite of this.sessionInfo.testSuitesToRun) {
Expand Down Expand Up @@ -149,6 +149,7 @@ export class RooibosSession {
"catchCrashes": ${this.config.catchCrashes ? 'true' : 'false'}
"throwOnFailedAssertion": ${this.config.throwOnFailedAssertion ? 'true' : 'false'}
"keepAppOpen": ${this.config.keepAppOpen === undefined || this.config.keepAppOpen ? 'true' : 'false'}
"isRecordingCodeCoverage": ${this.config.isRecordingCodeCoverage ? 'true' : 'false'}
}
`).ast.statements[0]
);
Expand Down
4 changes: 1 addition & 3 deletions framework/src/source/TestRunner.bs
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ namespace rooibos
}
m.nodeContext.global.testsScene.rooibosTestResult = rooibosResult

'bs:disable-next-line
if rooibos.common.isFunction(rooibos.Coverage.reportCodeCoverage)
'bs:disable-next-line
if m.config.isRecordingCodeCoverage
rooibos.Coverage.reportCodeCoverage()

if m.config.printLcov = true
Expand Down

0 comments on commit 8f97e91

Please sign in to comment.