-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: refactor and fix test-dns #9811
Conversation
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.
LGTM. If possible, maybe the RegExps can start with ^
and end with $
if they match the entire message?
* More precise length assertion. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Add missing RegExp to `throws` assertions.
465cda4
to
0d11800
Compare
Done. |
@@ -5,7 +5,7 @@ const assert = require('assert'); | |||
const dns = require('dns'); | |||
|
|||
const existing = dns.getServers(); | |||
assert(existing.length); | |||
assert(existing.length > 0); |
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.
Any reason for this change? I don't get it.
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.
I find it less confusing that way.
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.
Ok, thanks.
Landed in cf410af |
* More precise length assertion. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Add missing RegExp to `throws` assertions. PR-URL: #9811 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
* More precise length assertion. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Add missing RegExp to `throws` assertions. PR-URL: #9811 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
* More precise length assertion. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Add missing RegExp to `throws` assertions. PR-URL: nodejs#9811 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
* More precise length assertion. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Add missing RegExp to `throws` assertions. PR-URL: #9811 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
* More precise length assertion. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Add missing RegExp to `throws` assertions. PR-URL: nodejs#9811 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
* More precise length assertion. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Add missing RegExp to `throws` assertions. PR-URL: #9811 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test, dns
Description of change
throws
assertions.throws
assertions.