Skip to content

Commit 6c63ab7

Browse files
rvaggaddaleax
authored andcommitted
test: simplify test-http-client-unescaped-path
PR-URL: #9649 Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 159799a commit 6c63ab7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/parallel/test-http-client-unescaped-path.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@ const common = require('../common');
33
const assert = require('assert');
44
const http = require('http');
55

6-
function* bad() {
7-
for (let i = 0; i <= 32; i += 1)
8-
yield 'bad' + String.fromCharCode(i) + 'path';
9-
}
10-
11-
for (const path of bad()) {
6+
for (let i = 0; i <= 32; i += 1) {
7+
const path = 'bad' + String.fromCharCode(i) + 'path';
128
assert.throws(() => http.get({ path }, common.fail),
139
/contains unescaped characters/);
1410
}

0 commit comments

Comments
 (0)