mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
doc: fix typo in test runner code examples
PR-URL: https://github.com/nodejs/node/pull/44351 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
17c5b978a5
commit
eb90d650d4
1 file changed
+4
-4
+4
-4
@@ -524,7 +524,7 @@ before each subtest of the current suite.
|
||||
|
||||
```js
|
||||
describe('tests', async () => {
|
||||
beforeEach(() => t.diagnostics('about to run a test'));
|
||||
beforeEach(() => t.diagnostic('about to run a test'));
|
||||
it('is a subtest', () => {
|
||||
assert.ok('some relevant assertion here');
|
||||
});
|
||||
@@ -553,7 +553,7 @@ after each subtest of the current test.
|
||||
|
||||
```js
|
||||
describe('tests', async () => {
|
||||
afterEach(() => t.diagnostics('about to run a test'));
|
||||
afterEach(() => t.diagnostic('about to run a test'));
|
||||
it('is a subtest', () => {
|
||||
assert.ok('some relevant assertion here');
|
||||
});
|
||||
@@ -592,7 +592,7 @@ before each subtest of the current test.
|
||||
|
||||
```js
|
||||
test('top level test', async (t) => {
|
||||
t.beforeEach((t) => t.diagnostics(`about to run ${t.name}`));
|
||||
t.beforeEach((t) => t.diagnostic(`about to run ${t.name}`));
|
||||
await t.test(
|
||||
'This is a subtest',
|
||||
(t) => {
|
||||
@@ -624,7 +624,7 @@ after each subtest of the current test.
|
||||
|
||||
```js
|
||||
test('top level test', async (t) => {
|
||||
t.afterEach((t) => t.diagnostics(`finished running ${t.name}`));
|
||||
t.afterEach((t) => t.diagnostic(`finished running ${t.name}`));
|
||||
await t.test(
|
||||
'This is a subtest',
|
||||
(t) => {
|
||||
|
||||
Reference in new issue
Block a user