GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — test_runner: remove stray quotes from module mock error by farisbasha · Pull Request #67569 · nodejs/node Conversation
Contributor
The generated CommonJS mock source threw Disclosure: I used an AI assistant to help find this and draft the change and this description.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsThe generated CommonJS mock source threw
new Error('${JSONStringify(kBadExportsMessage)}'). JSONStringify
already returns a quoted string literal, so the extra single quotes
made the double quotes part of the message:
"Cannot create mock because ...". Pass the JSON literal directly and
check the start of the message in the test.
Signed-off-by: farisbasha <[email protected]>
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #67569 +/- ## ======================================== Coverage 90.71% 90.71% ======================================== Files 801 801 Lines 280740 280945 +205 Branches 54171 54245 +74 ======================================== + Hits 254661 254871 +210 + Misses 16258 16253 -5 Partials 9821 9821
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the review and the clear explanation of the fix! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is fine, although since it's a constant, it would make more sense to wrap JSONStringify around the original definition of kBadExportsMessage, rather than re-stringifying it on every error with the same result.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: farisbasha <[email protected]>
|
Thanks @Renegade334, good point. I couldn't wrap the definition itself because |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.