Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix typo in test runner code examples #44351

Merged
merged 1 commit into from Aug 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/api/test.md
Expand Up @@ -528,7 +528,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');
});
Expand Down Expand Up @@ -557,7 +557,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');
});
Expand Down Expand Up @@ -598,7 +598,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) => {
Expand Down Expand Up @@ -630,7 +630,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) => {
Expand Down