You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
696 B

'use strict';
require('../common');
const assert = require('assert');
const inspect = require('util').inspect;
const URL = require('url').URL;
assert.strictEqual(
inspect(URL.originFor('http://test.com:8000')),
`TupleOrigin {
scheme: http,
host: test.com,
port: 8000,
domain: null
}`
);
assert.strictEqual(
inspect(URL.originFor('http://test.com')),
`TupleOrigin {
scheme: http,
host: test.com,
port: undefined,
domain: null
}`
);
assert.strictEqual(
inspect(URL.originFor('https://test.com')),
`TupleOrigin {
scheme: https,
host: test.com,
port: undefined,
domain: null
}`
);