0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test
Rich Trott 97f76f3f04 test: use String.prototype.repeat() for clarity
There are a few places where tests repeatedly concatenate strings to
themselves in order to make them very long. Using `.repeat()` makes the
code clearer.

For example, before:

    for (var i = 0; i < 8; ++i) lots_of_headers += lots_of_headers;

After:

    lots_of_headers = lots_of_headers.repeat(256);

Using `.repeat()` makes it clear that the string will be repeated 256
times rather than 8 times. ("What?! That first one doesn't repeat 256
times! It only repeats 8... Oh, wait. Yes, I see your point now.")

PR-URL: https://github.com/nodejs/node/pull/5311
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-02-21 13:23:47 -08:00
..
abort
addons test: add addons test for MakeCallback 2016-02-12 14:03:34 -07:00
cctest
debugger lib,test: remove extra semicolons 2016-01-16 19:54:25 +01:00
disabled
fixtures test: enable to work pkcs12 test in FIPS mode 2016-02-09 13:05:48 +09:00
gc tools: lint for spacing around unary operators 2016-02-04 10:56:17 -08:00
internet dns: add resolvePtr to query plain DNS PTR records 2016-02-08 17:30:38 +01:00
message node: improve process.nextTick performance 2016-02-09 02:46:43 -07:00
parallel test: use String.prototype.repeat() for clarity 2016-02-21 13:23:47 -08:00
pummel test: pummel test fixes 2016-02-01 09:17:55 -08:00
sequential src,test,tools: modify for more stringent linting 2016-02-18 10:11:26 -08:00
testpy
timers test: remove unused vars 2016-01-05 08:59:58 -08:00
.eslintrc
common.js test: remove unneeded common.indirectInstanceOf() 2016-02-10 09:50:00 -08:00