Skip to content

Commit

Permalink
Fix SGNode test generation
Browse files Browse the repository at this point in the history
- `this.createNodeFile` was called only if
  `isGlobalMethodMockingEnabled` and
`isGlobalMethodMockingEfficientMode`, moved outside the case so it
always runs.
  • Loading branch information
Sam Heavner committed Feb 9, 2024
1 parent f2f9618 commit 58a60d9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bsc-plugin/src/lib/rooibos/RooibosSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@ export class RooibosSession {
console.log('Efficient global stubbing is enabled');
this.namespaceLookup = this.getNamespaces(program);
for (let testSuite of this.sessionInfo.testSuitesToRun) {
if (testSuite.isNodeTest) {
this.createNodeFile(program, testSuite);
}
mockUtil.gatherGlobalMethodMocks(testSuite);
}

} else {
this.namespaceLookup = new Map<string, NamespaceContainer>();
}
for (let testSuite of this.sessionInfo.testSuitesToRun) {
if (testSuite.isNodeTest) {
this.createNodeFile(program, testSuite);
}
}
}

updateSessionStats() {
Expand Down

0 comments on commit 58a60d9

Please sign in to comment.