From 536733697cb6fdd86b39d72bee4317badc6918ab Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 17 Nov 2016 11:20:27 +1100 Subject: [PATCH] test: simplify test-http-client-unescaped-path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/9649 Reviewed-By: Trevor Norris Reviewed-By: Santiago Gimeno Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Michaƫl Zasso Reviewed-By: Anna Henningsen --- test/parallel/test-http-client-unescaped-path.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-http-client-unescaped-path.js b/test/parallel/test-http-client-unescaped-path.js index 2411d0e6be..1a74943e83 100644 --- a/test/parallel/test-http-client-unescaped-path.js +++ b/test/parallel/test-http-client-unescaped-path.js @@ -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/); }