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

Fix error messages #352

Merged
merged 3 commits into from
Aug 12, 2018
Merged

Fix error messages #352

merged 3 commits into from
Aug 12, 2018

Conversation

vweevers
Copy link
Contributor

@vweevers
Copy link
Contributor Author

vweevers commented Aug 11, 2018

Side note: test/parallel/test-stream-pipeline.js is failing with OOM errors on Windows with node 6.

Edit: #353

@vweevers
Copy link
Contributor Author

Test failure is unrelated (it's the travis+npm timeout issue).

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

Amazing work! Would you mind adding some sort of unit test under test/ours? So we can verify those messages are the same? I fear they can get out of date real quick, and the Node.js unit tests do not verify them.

cc @BridgeAR

@vweevers
Copy link
Contributor Author

Would you mind adding some sort of unit test under test/ours?

OK. Should I use tap, tape or assert? The test suite is a mixture of these.

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM. Good work and thanks a lot for this!

@BridgeAR
Copy link
Member

@mcollina thinking about the changes: as long as they initially are aligned it should be fine. Testing these could only be done properly in Node core itself and at least adding tests for ERR_INVALID_ARG_TYPE would be redundant in core as that error is tested very often, including the error message.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

LGTM

@vweevers
Copy link
Contributor Author

Testing these could only be done properly in Node core itself and at least adding tests for ERR_INVALID_ARG_TYPE would be redundant in core

I already wrote tests, before I read this. So let me know if I should revert the commit. IMO it can't hurt to have tests here, because the code is not 100% equal to core, we have ponyfills for String.prototype.includes etc.

@BridgeAR
Copy link
Member

@vweevers all stream related Node core tests run against this module as well and that is how the tests should be tested. Having these tests here mean both sides could still diverge without noticing it. They probably do not hurt either tough.

To me it's your call if you keep them or remove them, even tough I would remove them.

@vweevers
Copy link
Contributor Author

Having these tests here mean both sides could still diverge without noticing it.

I see what you mean.

@mcollina your call :)

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

Still LGTM

@mcollina mcollina merged commit 3dc117e into nodejs:master Aug 12, 2018
@mcollina mcollina deleted the fix-error-messages branch August 12, 2018 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants