Files
JiboSDK/node_modules/url-parse-as-address/test/basic.js
2026-03-22 03:21:45 +02:00

18 lines
369 B
JavaScript

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()
})
})