Skip to content

Commit af7b217

Browse files
committed
Make the success:undefined check more explicit
1 parent 953ff5e commit af7b217

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/kbn-test/src/functional_test_runner/lib/suite_tracker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class SuiteTracker {
5656

5757
getTracked(suite: object): SuiteInProgress {
5858
if (!this.inProgressSuites.has(suite)) {
59-
this.inProgressSuites.set(suite, {} as SuiteInProgress);
59+
this.inProgressSuites.set(suite, { success: undefined } as SuiteInProgress);
6060
}
6161
return this.inProgressSuites.get(suite)!;
6262
}
@@ -97,7 +97,7 @@ export class SuiteTracker {
9797
tracked.endTime = new Date();
9898

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

0 commit comments

Comments
 (0)