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

[node:test] Incorrect SuiteContext description #47882

Closed
Semigradsky opened this issue May 5, 2023 · 0 comments · Fixed by #47800
Closed

[node:test] Incorrect SuiteContext description #47882

Semigradsky opened this issue May 5, 2023 · 0 comments · Fixed by #47800
Labels
doc Issues and PRs related to the documentations. test_runner Issues and PRs related to the test runner subsystem.

Comments

@Semigradsky
Copy link
Contributor

Affected URL(s)

https://nodejs.org/docs/latest-v20.x/api/test.html#describename-options-fn

Description of the problem

Docs said that callback function in describe:

declaring all subtests and subsuites. The first argument to this function is a SuiteContext object.

But in fact the first argument is array with SuiteContext:

import { describe } from 'node:test'

x.describe(function (suiteContext) {
    console.log(Array.isArray(suiteContext))     // true
    console.log(suiteContext[0])                 //  SuiteContext {}
})

Related to #45641 :-)

@Semigradsky Semigradsky added the doc Issues and PRs related to the documentations. label May 5, 2023
@VoltrexKeyva VoltrexKeyva added the test_runner Issues and PRs related to the test runner subsystem. label May 5, 2023
nodejs-github-bot pushed a commit that referenced this issue May 17, 2023
PR-URL: #47800
Fixes: #47882
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this issue May 30, 2023
PR-URL: #47800
Fixes: #47882
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
danielleadams pushed a commit that referenced this issue Jul 6, 2023
PR-URL: #47800
Fixes: #47882
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
MoLow pushed a commit to MoLow/node that referenced this issue Jul 6, 2023
PR-URL: nodejs#47800
Fixes: nodejs#47882
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants