Skip to content

Commit a97071e

Browse files
committed
doc: add missing passed and error properties on TestContext
`passed` and `error` properties were left undocumented on `TextContext` class Fixes: #59321 Refs: #51485 Refs: #59322
1 parent 15bdf38 commit a97071e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

doc/api/test.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3686,6 +3686,26 @@ added:
36863686

36873687
The name of the test.
36883688

3689+
### `context.passed` {boolean}
3690+
3691+
<!-- YAML
3692+
added:
3693+
- v21.7.0
3694+
- v20.12.0
3695+
-->
3696+
3697+
Indicated wether the test succeeded, this defaults to `false` before the test is executed, e.g. in a `beforeEach` hook.
3698+
3699+
### `context.error` {Error|null}
3700+
3701+
<!-- YAML
3702+
added:
3703+
- v21.7.0
3704+
- v20.12.0
3705+
-->
3706+
3707+
The failure reason for the test/case; wrapped and available via `context.error.cause`.
3708+
36893709
### `context.plan(count[,options])`
36903710

36913711
<!-- YAML

0 commit comments

Comments
 (0)