-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
doc: change error message testing policy #31421
doc: change error message testing policy #31421
Conversation
Dynamic error messages often contain important information that depends on the context, e.g., which argument caused an ERR_INVALID_ARG_TYPE, which type was expected, and which type was received. I don't think that internal breakage when changing a dynamic error message should prevent us from testing such properties properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole section seems somewhat outdated. We do not check for any new errors in test/parallel/test-internal-errors.js
. Instead, those are tested by checking the actual codes error condition. The basic functionality is tested internally with special test errors. I suggest to replace this section therefore with a note that new error codes should be tested by code that triggers those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also validating-minimally-with-a-regexp vs. validating-the-entire-text.
I'm happy with this material removed entirely, updated as you have done here, or updated as @BridgeAR suggests.
Dynamic error messages often contain important information that depends on the context, e.g., which argument caused an ERR_INVALID_ARG_TYPE, which type was expected, and which type was received. I don't think that internal breakage when changing a dynamic error message should prevent us from testing such properties properly. PR-URL: #31421 Reviewed-By: Rich Trott <[email protected]>
Landed in d65e6a5. I agree that larger changes are necessary. |
Dynamic error messages often contain important information that depends on the context, e.g., which argument caused an ERR_INVALID_ARG_TYPE, which type was expected, and which type was received. I don't think that internal breakage when changing a dynamic error message should prevent us from testing such properties properly. PR-URL: #31421 Reviewed-By: Rich Trott <[email protected]>
Dynamic error messages often contain important information that depends on the context, e.g., which argument caused an ERR_INVALID_ARG_TYPE, which type was expected, and which type was received. I don't think that internal breakage when changing a dynamic error message should prevent us from testing such properties properly. PR-URL: #31421 Reviewed-By: Rich Trott <[email protected]>
Dynamic error messages often contain important information that depends on the context, e.g., which argument caused an ERR_INVALID_ARG_TYPE, which type was expected, and which type was received. I don't think that internal breakage when changing a dynamic error message should prevent us from testing such properties properly. PR-URL: #31421 Reviewed-By: Rich Trott <[email protected]>
Dynamic error messages often contain important information that depends on the context, e.g., which argument caused an ERR_INVALID_ARG_TYPE, which type was expected, and which type was received. I don't think that internal breakage when changing a dynamic error message should prevent us from testing such properties properly. PR-URL: #31421 Reviewed-By: Rich Trott <[email protected]>
Dynamic error messages often contain important information that depends on the context, e.g., which argument caused an
ERR_INVALID_ARG_TYPE
, which type was expected, and which type was received. I don't think that internal breakage when changing a dynamic error message should prevent us from testing such properties properly. (Not to test the error message, but rather the API that uses the error code.)Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes