Commit Graph

22 Commits

Author SHA1 Message Date
Rich Trott
e675d4bd2b test: refactor pummel/test-net-many-clients
* Use port 0 instead of `common.PORT`.
* Reduce `concurrent` from 100 to 50 and `connections_per_client` from 5
  to 3. This is to avoid side effects from other tests. Prior to this
  change, running this along with test-keep-alive would result in
  failures on my local setup, apparently due to network throttling.
* Remove unnecessary `console.log()` and improve remaining
  `console.log()` to provide clearer information.

PR-URL: https://github.com/nodejs/node/pull/25485
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-01-16 06:49:18 -08:00
Tyler Vann-Campbell
ad6b09f709
test: use the correct parameter order on assert.strictEqual()
The parameter order for assert.strictEqual() should be actual, expected
rather than expected, actual which can make test failure messages
confusing. This change reverses the order of the assertion to
match the documented parameter order.

PR-URL: https://github.com/nodejs/node/pull/23520
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-15 12:00:00 +02:00
James M Snell
98e54b0bd4 meta: restore original copyright header
A prior io.js era commit inappropriately removed the
original copyright statements from the source. This
restores those in any files still remaining from that
edit.

Ref: https://github.com/nodejs/TSC/issues/174
Ref: https://github.com/nodejs/node/pull/10599
PR-URL: https://github.com/nodejs/node/pull/10155

Note: This PR was required, reviewed-by and approved
by the Node.js Foundation Legal Committee and the TSC.
There is no `Approved-By:` meta data.
2017-03-10 11:23:48 -08:00
Gibson Fahnestock
3d2aef3979 test: s/assert.equal/assert.strictEqual/
Use assert.strictEqual instead of assert.equal in tests, manually
convert types where necessary.

PR-URL: https://github.com/nodejs/node/pull/10698
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
2017-01-11 14:19:26 +00:00
Gibson Fahnestock
7a0e462f9f test: use eslint to fix var->const/let
Manually fix issues that eslint --fix couldn't do automatically.

PR-URL: https://github.com/nodejs/node/pull/10685
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2017-01-11 11:43:52 +00:00
cjihrig
ff1efa6087 test: use const for all require() calls
PR-URL: https://github.com/nodejs/node/pull/10550
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-01-02 18:28:18 -05:00
Rich Trott
8ff3d61d8b test: favor strict equality in pummel net tests
Favor strict equality checks over loose equality checks in
pummel/test-net-* tests.

PR-URL: https://github.com/nodejs/node/pull/8135
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-18 21:05:18 -07:00
Jackson Tian
4d78121b77 lib: simplify code with String.prototype.repeat()
use String.prototype.repeat() to simplify code, less code,
more semantically.

PR-URL: https://github.com/nodejs/node/pull/5359
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 16:42:58 -07:00
Rich Trott
306936e98f test: change calls to deprecated util.print()
common.print() is just util.print() and as such prints a deprecation
warning. Per docs, update to console.log().

PR-URL: https://github.com/nodejs/node/pull/3083
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-09-28 13:21:15 -07:00
Roman Reiss
f29762f4dd test: enable linting for tests
Enable linting for the test directory. A number of changes was made so
all tests conform the current rules used by lib and src directories. The
only exception for tests is that unreachable (dead) code is allowed.

test-fs-non-number-arguments-throw had to be excluded from the changes
because of a weird issue on Windows CI.

PR-URL: https://github.com/nodejs/io.js/pull/1721
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-19 21:21:27 +02:00
isaacs
3e1b1dd4a9 Remove excessive copyright/license boilerplate
The copyright and license notice is already in the LICENSE file.  There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.
2015-01-12 15:30:28 -08:00
Timothy J Fontaine
72c58158f7 test: fix pummel/test-net-many-clients.js
client sockets no longer emit 'connect' event inside the
requestListener, update test-net-many-clients to reflect that
2013-05-08 19:31:45 -07:00
Ben Noordhuis
018e110cd1 test: replace .addListener() calls with .on() 2011-10-15 01:08:36 +02:00
Ryan Dahl
55048cdf79 Update copyright headers 2011-03-14 17:37:05 -07:00
Oleg Efimov
093dfaf801 GJSLint all tests, only 3 long lines left in test-url.js
test/simple/test-url.js:31:(0110) Line too long (82 characters).
test/simple/test-url.js:39:(0110) Line too long (85 characters).
test/simple/test-url.js:40:(0110) Line too long (92 characters).
2010-12-05 15:42:41 -08:00
Ryan Dahl
92789b16e5 Fix global leaks 2010-12-04 16:36:21 -08:00
Ryan Dahl
a0159b4b29 Fix global leaks 2010-12-04 15:58:50 -08:00
Oleg Efimov
c0d69a4883 GJSLint part of tests 2010-12-02 17:49:23 -08:00
Herbert Vojčík
cf2b206a8e More changes to tests so they really work under context module loader.
Plus, getting rid of test/common.js defining things in global.
2010-08-17 08:41:05 -07:00
Ryan Dahl
9fd5e3c89c Update tests to work with module contexts 2010-07-15 14:21:31 -07:00
Ryan Dahl
ba792ea202 :%s/sys.puts/console.log/g
and there was much rejoicing
2010-06-23 20:05:29 -07:00
Micheil Smith
e0d30b545a Renaming tcp tests to net tests 2010-06-18 10:34:56 -07:00