Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: simplify test-http-client-unescaped-path
  • Loading branch information
rvagg committed Nov 17, 2016
commit 7d288d531f72c615293c109f4612e3ac530b4b20
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) {
let path = 'bad' + String.fromCharCode(i) + 'path';
assert.throws(() => http.get({ path }, common.fail),
/contains unescaped characters/);
}