Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add failing tests

  • Loading branch information...
commit 7447fa9932e0751a3604ace221efb5e7534b412a 1 parent 1ba2c32
Isaac Z. Schlueter authored

Showing 1 changed file with 27 additions and 0 deletions. Show diff stats Hide diff stats

  1. +27 0 test/simple/test-url.js
27 test/simple/test-url.js
@@ -274,8 +274,28 @@ var parseTests = {
274 274 'search' : '?search=foo',
275 275 'query' : 'search=foo',
276 276 'hash' : '#bar'
  277 + },
  278 + 'http://➡.ws/pageloads' : {
  279 + 'href' : 'http://➡.ws/pageloads',
  280 + 'protocol' : 'http:',
  281 + 'host' : '➡.ws',
  282 + 'hostname' : '➡.ws',
  283 + 'pathname' : '/pageloads'
  284 + },
  285 + 'http://user:pass@[::1]:8080/path?search=query#hash' : {
  286 + 'href' : 'http://user:pass@[::1]:8080/path?search=query#hash',
  287 + 'protocol' : 'http:',
  288 + 'host' : 'user:pass@[::1]:8080',
  289 + 'auth' : 'user:pass',
  290 + 'hostname' : '::1',
  291 + 'pathname' : '/path',
  292 + 'search' : '?search=query',
  293 + 'query' : 'search=query',
  294 + 'hash' : '#hash'
277 295 }
  296 +
278 297 };
  298 +
279 299 for (var u in parseTests) {
280 300 var actual = url.parse(u),
281 301 expected = parseTests[u];
@@ -419,6 +439,13 @@ var formatTests = {
419 439 'hostname': 'foo',
420 440 'protocol': 'http:',
421 441 'pathname': '/'
  442 + },
  443 + 'http://atslash%3A%2F%40:%2F%40@foo/' : {
  444 + 'href': 'http://atslash%3A%2F%40:%2F%40@foo/',
  445 + 'auth': 'atslash%3A/@:/@',
  446 + 'hostname': 'foo',
  447 + 'protocol': 'http:',
  448 + 'pathname': '/'
422 449 }
423 450 };
424 451 for (var u in formatTests) {

0 comments on commit 7447fa9

Please sign in to comment.
Something went wrong with that request. Please try again.