mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 06:31:11 +00:00

PR-URL: https://github.com/nodejs/node/pull/11049 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
19 lines
297 B
JavaScript
19 lines
297 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const url = require('url');
|
|
|
|
// https://github.com/joyent/node/issues/568
|
|
[
|
|
undefined,
|
|
null,
|
|
true,
|
|
false,
|
|
0.0,
|
|
0,
|
|
[],
|
|
{}
|
|
].forEach(function(val) {
|
|
assert.throws(function() { url.parse(val); }, TypeError);
|
|
});
|