mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
test: remove unneeded string splitting
PR-URL: https://github.com/nodejs/node/pull/12992 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Luca Maraschi <luca.maraschi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This commit is contained in:
1 parent
32f01c8c11
commit
88d2e699d8
22 files changed
+57
-63
No files matched your search
@@ -30,8 +30,8 @@ assert.throws(function() {
|
||||
http.request(url.parse('file:///whatever'));
|
||||
}, function(err) {
|
||||
if (err instanceof Error) {
|
||||
assert.strictEqual(err.message, 'Protocol "file:" not supported.' +
|
||||
' Expected "http:"');
|
||||
assert.strictEqual(
|
||||
err.message, 'Protocol "file:" not supported. Expected "http:"');
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -40,8 +40,8 @@ assert.throws(function() {
|
||||
http.request(url.parse('mailto:asdf@asdf.com'));
|
||||
}, function(err) {
|
||||
if (err instanceof Error) {
|
||||
assert.strictEqual(err.message, 'Protocol "mailto:" not supported.' +
|
||||
' Expected "http:"');
|
||||
assert.strictEqual(
|
||||
err.message, 'Protocol "mailto:" not supported. Expected "http:"');
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -50,8 +50,8 @@ assert.throws(function() {
|
||||
http.request(url.parse('ftp://www.example.com'));
|
||||
}, function(err) {
|
||||
if (err instanceof Error) {
|
||||
assert.strictEqual(err.message, 'Protocol "ftp:" not supported.' +
|
||||
' Expected "http:"');
|
||||
assert.strictEqual(
|
||||
err.message, 'Protocol "ftp:" not supported. Expected "http:"');
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -60,8 +60,8 @@ assert.throws(function() {
|
||||
http.request(url.parse('javascript:alert(\'hello\');'));
|
||||
}, function(err) {
|
||||
if (err instanceof Error) {
|
||||
assert.strictEqual(err.message, 'Protocol "javascript:" not supported.' +
|
||||
' Expected "http:"');
|
||||
assert.strictEqual(
|
||||
err.message, 'Protocol "javascript:" not supported. Expected "http:"');
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -70,8 +70,8 @@ assert.throws(function() {
|
||||
http.request(url.parse('xmpp:isaacschlueter@jabber.org'));
|
||||
}, function(err) {
|
||||
if (err instanceof Error) {
|
||||
assert.strictEqual(err.message, 'Protocol "xmpp:" not supported.' +
|
||||
' Expected "http:"');
|
||||
assert.strictEqual(
|
||||
err.message, 'Protocol "xmpp:" not supported. Expected "http:"');
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -80,8 +80,8 @@ assert.throws(function() {
|
||||
http.request(url.parse('f://some.host/path'));
|
||||
}, function(err) {
|
||||
if (err instanceof Error) {
|
||||
assert.strictEqual(err.message, 'Protocol "f:" not supported.' +
|
||||
' Expected "http:"');
|
||||
assert.strictEqual(
|
||||
err.message, 'Protocol "f:" not supported. Expected "http:"');
|
||||
return true;
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user