node/test/parallel/test-url-parse-invalid-input.js
Joyee Cheung 147d2a6419 url, test: break up test-url.js
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>
2017-01-30 10:19:37 -08:00

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