Skip to content

Commit 63ff66e

Browse files
committed
fix: correctly specify "testplaneCtx.assertViewResults" type
1 parent 51399ea commit 63ff66e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

typings/index.d.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,22 @@ declare namespace Hermione {
285285
};
286286
}
287287

288+
export interface ExecutionThreadToolCtx {
289+
assertViewResults: {
290+
add: (result: AssertViewResultsSuccess) => void;
291+
hasFails: () => boolean;
292+
hasState: (stateName: string) => boolean;
293+
toRawObject: () => Array<AssertViewResultsSuccess>;
294+
get: () => Array<AssertViewResultsSuccess>;
295+
};
296+
}
297+
288298
export interface TestResult extends Test {
289299
startTime: number;
290300
duration: number;
291301
assertViewResults: Array<AssertViewResultsSuccess>;
292302
meta: { [name: string]: unknown };
293-
hermioneCtx: {
294-
assertViewResults: Array<AssertViewResultsSuccess>;
295-
};
303+
hermioneCtx: ExecutionThreadToolCtx;
296304
history: History;
297305
err?: TestError;
298306
}

0 commit comments

Comments
 (0)