NodeJS Compat: more utils tests, experimentalWarning, styleText#4225
Merged
guybedford merged 9 commits intomainfrom Jun 5, 2025
Merged
NodeJS Compat: more utils tests, experimentalWarning, styleText#4225guybedford merged 9 commits intomainfrom
guybedford merged 9 commits intomainfrom
Conversation
guybedford
commented
May 31, 2025
Contributor
There was a problem hiding this comment.
Other comments (1)
- src/node/util.ts (289-290) The non-null assertion operator (`!`) after optional chaining (`?.`) in `(stream as any)!.getColorDepth()` is redundant and potentially confusing. If the optional chaining returns undefined, the assertion won't be reached. Consider removing the non-null assertion.
1 file skipped due to size limits:
- src/workerd/api/node/tests/util-nodejs-test.js
guybedford
commented
May 31, 2025
guybedford
commented
May 31, 2025
jasnell
reviewed
May 31, 2025
jasnell
approved these changes
May 31, 2025
anonrig
reviewed
May 31, 2025
af99601 to
e9f246e
Compare
jasnell
approved these changes
Jun 2, 2025
anonrig
approved these changes
Jun 4, 2025
Member
anonrig
left a comment
There was a problem hiding this comment.
Other than the mustCall() implementation, LGTM, but I don't think we should start implementing nodejs test runner yet.
e9f246e to
335835f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds more utils tests including:
Then also includes a noop implementation of
util.emitExperimentalWarning, and adds support forutil.styleText, porting those test suites as well.