| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f6d2af8 commit 048478d
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3014,6 +3014,24 @@ test('top level test', async (t) => { | |||
| 3014 | 3014 | }); | |
| 3015 | 3015 | ``` | |
| 3016 | 3016 | ||
| 3017 | + ### `context.assert` | ||
| 3018 | + | ||
| 3019 | + <!-- YAML | ||
| 3020 | + added: | ||
| 3021 | + - v22.2.0 | ||
| 3022 | + --> | ||
| 3023 | + | ||
| 3024 | + An object containing assertion methods bound to `context`. The top-level | ||
| 3025 | + functions from the `node:assert` module are exposed here for the purpose of | ||
| 3026 | + creating test plans. | ||
| 3027 | + | ||
| 3028 | + ```js | ||
| 3029 | + test('test', (t) => { | ||
| 3030 | + t.plan(1); | ||
| 3031 | + t.assert.strictEqual(true, true); | ||
| 3032 | + }); | ||
| 3033 | + ``` | ||
| 3034 | + | ||
| 3017 | 3035 | ### `context.diagnostic(message)` | |
| 3018 | 3036 | ||
| 3019 | 3037 | <!-- YAML | |
| Back | FazBrowse Home | New Git URL |
0 commit comments