We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92f3b30 commit 7906ed5Copy full SHA for 7906ed5
test/parallel/test-url-parse-invalid-input.js
@@ -12,9 +12,13 @@ const url = require('url');
12
0.0,
13
0,
14
[],
15
- {}
16
-].forEach(function(val) {
17
- assert.throws(function() { url.parse(val); }, TypeError);
+ {},
+ () => {},
+ Symbol('foo')
18
+].forEach((val) => {
19
+ assert.throws(() => { url.parse(val); },
20
+ /^TypeError: Parameter "url" must be a string, not (undefined|boolean|number|object|function|symbol)$/);
21
});
22
-assert.throws(function() { url.parse('http://%E0%A4%A@fail'); }, /^URIError: URI malformed$/);
23
+assert.throws(() => { url.parse('http://%E0%A4%A@fail'); },
24
+ /^URIError: URI malformed$/);
0 commit comments