Skip to content

Commit

Permalink
test: simplify test-http-client-unescaped-path
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rvagg authored and MylesBorins committed Mar 9, 2017
1 parent 15231aa commit 5367336
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/parallel/test-http-client-unescaped-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ const common = require('../common');
const assert = require('assert');
const http = require('http');

function* bad() {
for (let i = 0; i <= 32; i += 1)
yield 'bad' + String.fromCharCode(i) + 'path';
}

for (const path of bad()) {
for (let i = 0; i <= 32; i += 1) {
const path = 'bad' + String.fromCharCode(i) + 'path';
assert.throws(() => http.get({ path }, common.fail),
/contains unescaped characters/);
}

0 comments on commit 5367336

Please sign in to comment.