initial commit
This commit is contained in:
17
node_modules/url-parse-as-address/test/basic.js
generated
vendored
Normal file
17
node_modules/url-parse-as-address/test/basic.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
var test = require('tap').test
|
||||
var parse = require('../')
|
||||
|
||||
var tests = {
|
||||
'x': 'http://x/',
|
||||
'foo.com': 'http://foo.com/',
|
||||
'a@b:123/c': 'http://a@b:123/c'
|
||||
}
|
||||
|
||||
Object.keys(tests).forEach(function (c) {
|
||||
test(c, function (t) {
|
||||
t.equal(parse(c).href, tests[c])
|
||||
t.equal(parse(tests[c]).href, tests[c])
|
||||
t.equal(parse.format(c), tests[c])
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user