You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the way we check if events have been properly sent is quite basic:
we trigger the trail matching the required pattern
we execute some code to get the event to be sent
we wait an arbitrary amount of time
we retrieve the events from the trail
we assert with the content of the trail
This works, but is suboptimal, since increasing the wait time can lead to more reliable results, but on the same time increase our overall test duration. On the contrary, reducing the wait time can cause the tests to become flaky.
We should not have to manually wait at all.
The API could look something like:
awaiteventScoutClient.toContainEvents(// some assertions, for exampleexpect.arrayContaining([expect.objectContaining({
source,'detail-type': detailType,// eslint-disable-next-line @typescript-eslint/no-unsafe-assignmentdetail: expect.objectContaining({toto: 'tata',
runId,}),}),]));
The text was updated successfully, but these errors were encountered:
Currently the way we check if events have been properly sent is quite basic:
assert
with the content of the trailThis works, but is suboptimal, since increasing the wait time can lead to more reliable results, but on the same time increase our overall test duration. On the contrary, reducing the wait time can cause the tests to become flaky.
We should not have to manually wait at all.
The API could look something like:
The text was updated successfully, but these errors were encountered: