test: avoid assigning this to variables

This commit removes assignments of this to a variable in the
tests.

PR-URL: https://github.com/nodejs/node/pull/10548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
cjihrig 2016-12-30 15:42:06 -05:00
parent 6540fb9f1f
commit 1d11b47aa7
4 changed files with 27 additions and 30 deletions

View file

@ -50,9 +50,8 @@ server.listen(0, options.host, function() {
this.destroy();
});
req.setTimeout(50, function() {
var req = this;
console.log('req#' + this.id + ' timeout');
req.abort();
this.abort();
requests_done += 1;
});
req.end();