-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
#45641
Comments
But import { test } from 'node:test'
test(function(foo) {
console.log('First argument: ', foo)
console.log('this: ', this)
})
> First argument: TestContext {}
> this: TestContext {} |
@cjihrig it is simply generated as an object literal node/lib/internal/test_runner/test.js Lines 739 to 741 in f8ce911
|
I think we should either change the docs to remove the use of |
added SuiteContext class to replace object literal Fixes: nodejs#45641 Refs: nodejs#45641 (comment)
Have added PR for the same @cjihrig |
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Affected URL(s)
https://nodejs.org/docs/latest-v18.x/api/test.html#describename-options-fn
Description of the problem
Docs said that tha callback function in
describe
:But in fact
SuiteContext
is not the first argument.SuiteContext
isthis
context:The text was updated successfully, but these errors were encountered: