Skip to content

Commit

Permalink
Make the success:undefined check more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders committed Apr 16, 2020
1 parent 953ff5e commit af7b217
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class SuiteTracker {

getTracked(suite: object): SuiteInProgress {
if (!this.inProgressSuites.has(suite)) {
this.inProgressSuites.set(suite, {} as SuiteInProgress);
this.inProgressSuites.set(suite, { success: undefined } as SuiteInProgress);
}
return this.inProgressSuites.get(suite)!;
}
Expand Down Expand Up @@ -97,7 +97,7 @@ export class SuiteTracker {
tracked.endTime = new Date();

// The suite ended without any children failing, so we can mark it as successful
if (!('success' in tracked)) {
if (typeof tracked.success === 'undefined') {
tracked.success = true;
}

Expand Down

0 comments on commit af7b217

Please sign in to comment.