Skip to content

test: refactor and fix test-dns - #9811

Closed
targos wants to merge 1 commit into
nodejs:masterfrom
targos:refactor-test-dns
Closed

test: refactor and fix test-dns#9811
targos wants to merge 1 commit into
nodejs:masterfrom
targos:refactor-test-dns

Conversation

@targos

Copy link
Copy Markdown
Member
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test, dns

Description of change
  • More precise length assertion.
  • Fix incorrect use of string instead of RegExp in throws assertions.
  • Add missing RegExp to throws assertions.

@targostargos added dns Issues and PRs related to the dns subsystem. test Issues and PRs related to the tests. labels Nov 26, 2016

@TrottTrott left a comment

Copy link
Copy Markdown
Member

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.
@targos

Copy link
Copy Markdown
MemberAuthor

If possible, maybe the RegExps can start with ^ and end with $ if they match the entire message

Done.
CI: https://ci.nodejs.org/job/node-test-pull-request/4999/


const existing = dns.getServers();
assert(existing.length);
assert(existing.length > 0);

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
MemberAuthor

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, thanks.

@targos

Copy link
Copy Markdown
MemberAuthor

Landed in cf410af

@targostargos closed this Nov 29, 2016
@targos
targos deleted the refactor-test-dns branch November 29, 2016 12:15
targos added a commit that referenced this pull request Nov 29, 2016
* 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 <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
addaleax pushed a commit that referenced this pull request Dec 5, 2016
* 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 <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@Fishrock123Fishrock123 mentioned this pull request Dec 5, 2016
2 tasks
addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
* 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 <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
* 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 <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Dec 21, 2016
targos added a commit to targos/node that referenced this pull request Dec 27, 2016
* 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 <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 27, 2016
* 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 <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Dec 27, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dnsIssues and PRs related to the dns subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@targos@Trott@lpinca@cjihrig@MylesBorins@addaleax