Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
let tests pass in all environments
the `.invalid` domain name is a special, reserved domain name best
suitable for testing purposes, as it happens that some clients
have something running on some domains or are routed somewhere.

list of reserved domain names:
http://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml

reference:
http://tools.ietf.org/html/rfc6761

PR: #20
PR-URL: #20
Reviewed-By: garren smith <garren.smith@gmail.com>
  • Loading branch information
robertkowalski committed Feb 5, 2016
1 parent 795c310 commit a3b4c21efd96521f4fb2570a1c71eba73972c591
Showing 2 changed files with 5 additions and 5 deletions.
@@ -132,7 +132,7 @@ describe('activetasks', () => {

it('returns error for bad connections', () => {

return getActiveTask('http://127.1.1.10')
return getActiveTask('http://doesnotexist.invalid')
.catch(err => {
assert.ok(/Could not connect/.test(err.message));
});
@@ -74,9 +74,9 @@ describe('couch-config', () => {

it('getConfig throws error on bad url', () => {
return getConfig('node1', 'bad-url')
.catch(err => {
assert.ok(/not a valid url/.test(err.message));
});
.catch(err => {
assert.ok(/not a valid url/.test(err.message));
});
});

it('getConfig throws error on invalid protocol', () => {
@@ -87,7 +87,7 @@ describe('couch-config', () => {
});

it('gets config bad url returns false', () => {
return getConfig('node1', 'http://127.0.0.2/')
return getConfig('node1', 'http://badurl.invalid')
.catch(err => {
assert.ok(/Could not find node/.test(err.message));
});

0 comments on commit a3b4c21

Please sign in to comment.