Mock console logging during tests + use explicit resource management for spies#4138
Open
eemeli wants to merge 3 commits into
Open
Mock console logging during tests + use explicit resource management for spies#4138eemeli wants to merge 3 commits into
eemeli wants to merge 3 commits into
Conversation
Collaborator
|
Please fix the failing tests. |
Member
Author
|
The fix here was to update the Node.js used in tests to v24, which is what we're already using in the Docker containers. I'd misread the release notes on the introduction of explicit resource management; that didn't actually become available until Node.js v24. |
Collaborator
|
Hi @nishitmistry, do you have cycles to review this? |
Collaborator
hi @mathjazz, yes |
| ] | ||
| }, | ||
| "engines": { | ||
| "node": ">= 24", |
Collaborator
There was a problem hiding this comment.
i think you forget to push the updated package-lock.json file.
Collaborator
|
rest lgtm |
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.
A few of the tests that were ported to vitest are logging to the console during normal runs; let's mock them and test that they are called instead.
Also, with explicit resource management (
usinginstead ofconst) the mocks get automatically cleaned up.