Returns the (case+subcase) parameters for this test function invocation.
Gets the test fixture's shared state. This object is shared between subcases within the same testcase.
Pop count
error scopes, and assert they all return null
. Chunks the
awaits so we only Promise.all
200 scopes at a time, instead of stalling
on a huge Promise.all
all at once. This helps Chromium's "heartbeat"
mechanism know that the test is still running (and not hung).
Wraps an async function, passing it an Error
object recording the original stack trace.
The async work will be implicitly waited upon before reporting a test status.
If the argument is an Error
, fail (or warn). If it's undefined
, no-op.
If the argument is an array, apply the above behavior on each of elements.
Optional
mode?: "fail" | "warn"Optional
niceExpect an uncapturederror event to occur. Note: this MUST be awaited, because otherwise it could erroneously pass by capturing an error from later in the test.
Expect that the provided promise rejects, with the provided exception name.
Expect that the provided function throws (if true
or string
) or not (if false
).
If a string is provided, expect that the throw exception has that name.
MAINTENANCE_TODO: Change to string | false
so the exception name is always checked.
Static
MakeGenerated using TypeDoc
A test class to help test error scopes and uncapturederror events.