OptionalgroupWhich lifecycle group the hook belongs to, eg. "beforeAll", "beforeEach",
"afterEach", "afterAll".
The failure message.
The hook's own name, eg. "before" or the description passed when it was registered.
OptionalstackThe failure stack, when the thrown value carried one.
OptionalsuiteThe >-separated path of the suite the hook was registered against.
OptionaltestThe description of the test the hook was running for, for the per-test
(beforeEach/afterEach) groups only.
OptionaltimedWhether the hook exceeded its timeout rather than throwing.
Describes a single lifecycle hook (
before/beforeEach/afterEach/after) that failed or timed out during a run.Hook failures are otherwise easy to lose: an
afterEachthat throws after its test already failed is discarded (the test is already failed, there is nothing left to mark), and abefore/afterfailure aborts the surrounding suite without ever appearing in the pass/fail counts -- no test "owns" it. Every failure is recorded here instead so the run summary can surface them, and so--fail-on-hookhas something to fail the run on.Deliberately plain and fully serializable (the error is captured as its message/stack strings rather than as an
Error) because the browser and worker targets return their summary to the CLI across apostMessageboundary.Since
0.2.0