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

assert: don't serialize assert.snapshot input #44443

Closed
wants to merge 2 commits into from

Conversation

MoLow
Copy link
Member

@MoLow MoLow commented Aug 29, 2022

follow-up from #44429
waiting for #44429 to land so documentation will be adjusted as well

@nodejs-github-bot nodejs-github-bot added assert Issues and PRs related to the assert subsystem. needs-ci PRs that need a full CI run. labels Aug 29, 2022
@@ -51,7 +51,6 @@ function getTarget() {
}

function serializeName(name) {
validateString(name, 'name');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick question: Is there a specific reason to remove this validation in here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved it to the callsite

@benjamingr
Copy link
Member

cc #44466

Copy link
Member

@tniessen tniessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This again does not come close to correctness.

At a quick glance at the implementation, I am pretty sure these will fail:

await snapshot('x\n#*#*#*#*#*#*#*#*#*#*#*#\nb:\ny', 'foo');
await snapshot('a:\r\nb', 'bar');

@MoLow MoLow closed this Jan 5, 2023
@MoLow MoLow deleted the assert-snapshot-no-serialization branch May 24, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants