We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
node:test
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
Enumerating the "OwnPropertyNames" of node:test module I have noticed that the current tree is rather wrong https://github.com/eslint-community/eslint-plugin-n/blob/master/lib/unsupported-features/node-builtins-modules/test.js#L8-L48
import * as Test from 'node:test'; console.info(process.version); console.info(Object.getOwnPropertyNames(Test));
$ node test.js v22.11.0 [ 'after', 'afterEach', 'before', 'beforeEach', 'default', 'describe', 'it', 'mock', 'only', 'run', 'skip', 'suite', 'test', 'todo' ]
I think these need to be removed:
MockFunctionContext
MockModuleContext
MockTracker
MockTimers
TestsStream
TestContext
SuiteContext
MockTracker needs to be moved to its own and used as a constructed class on test.mock, eg like:
test.mock
const MockTracker = { fn: { [READ]: { supported: [ "19.1.0", "18.13.0" ] } }, getter: { [READ]: { supported: [ "19.3.0", "18.13.0" ] } }, method: { [READ]: { supported: [ "19.1.0", "18.13.0" ] } }, module: { [READ]: { experimental: [ "20.18.0" ] } }, reset: { [READ]: { supported: [ "19.1.0", "18.13.0" ] } }, restoreAll: { [READ]: { supported: [ "19.1.0", "18.13.0" ] } }, setter: { [READ]: { supported: [ "19.3.0", "18.13.0" ] } }, }
However, the class at test.mock does not seem to match the MockTracker in the docs...
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Enumerating the "OwnPropertyNames" of
node:test
module I have noticed that the current tree is rather wrong https://github.com/eslint-community/eslint-plugin-n/blob/master/lib/unsupported-features/node-builtins-modules/test.js#L8-L48I think these need to be removed:
MockFunctionContext
MockModuleContext
MockTracker
MockTimers
TestsStream
TestContext
SuiteContext
MockTracker
needs to be moved to its own and used as a constructed class ontest.mock
, eg like:However, the class at
test.mock
does not seem to match theMockTracker
in the docs...The text was updated successfully, but these errors were encountered: