0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

338 Commits

Author SHA1 Message Date
Rich Trott
86a49ce2d8 test: move client renegotiation tests to parallel
* Move client renegotiation limit tests from pummel to parallel.
* Rename tests to more accurately reflect what they do.
* Refactor to use  arrow functions for anonymouse callbacks and to be
  consistent about trailing commas.

PR-URL: https://github.com/nodejs/node/pull/25757
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-30 07:53:12 -08:00
Rich Trott
87f6804b80 test: move heapdump tests to pummel
The heapdump tests take a lot more time to run than our other tests in
parallel. They are also a bit of an internal test that perhaps does not
need to be run on every commit on every platform. This change moves them
to the pummel directory where they will be run on a single platform once
a day in CI.

This shaves more than 20 seconds off `make test` on my laptop, FWIW.

PR-URL: https://github.com/nodejs/node/pull/25181
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-29 09:10:36 -08:00
Rich Trott
953dae132d test: remove pummel/test-exec
Remove redundant test/pummel/test-exec.js.

Refs: https://github.com/nodejs/node/pull/25686#pullrequestreview-196243499

PR-URL: https://github.com/nodejs/node/pull/25722
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-28 02:06:13 -08:00
Rich Trott
43c2a13c93 test: replace s_client in test-https-ci-reneg-attack
Replace `s_client` in test-https-ci-reneg-attack with built-in
client calling `tls.renegotiate()`. This also fixes the currently-broken
test. (It is broken due to a change in behavior in a
recently-updated-in-core version of `s_client`.)

PR-URL: https://github.com/nodejs/node/pull/25720
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-01-28 01:57:47 -08:00
Rich Trott
c4216194be test: remove s_client from test-tls-ci-reneg-attack
Rewrite test-tls-ci-reneg-attack to use tls.renegotiate() instead of
external (and potentially unpredictable/quirky/buggy) s_client.

Refs: https://github.com/nodejs/node/pull/25676#issuecomment-457307881

PR-URL: https://github.com/nodejs/node/pull/25700
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-01-27 09:14:31 -08:00
Rich Trott
0c6b5cea42 test: fix pummel/test-exec
Fix test/pummel/test-exec.js which broke as a result of
e47f972d68
(https://github.com/nodejs/node/pull/24951).

(Until very recently, pummel tests were not run at all in CI and
currently only run nightly on master.)

PR-URL: https://github.com/nodejs/node/pull/25677
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-01-24 12:22:04 -08:00
Rich Trott
c9208f7ee0 test: remove potential race condition in https renegotiation test
In test/pummel/test-https-ci-reneg-attack.js, there is a boolean that is
causing a race condition on some operating systems. It is unnecessary.
Remove it.

PR-URL: https://github.com/nodejs/node/pull/25601
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-22 22:22:55 -08:00
Rich Trott
c33d38b449 test: replace common.PORT with 0 in https renegotiation test
Repeated use of common.PORT was resulting in sporadic failures on some
operating systems.

PR-URL: https://github.com/nodejs/node/pull/25599
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-01-22 18:47:10 -08:00
Rich Trott
f2e3a4ed8e test: prepare test-hash-seed for CI
Reduce the time it takes to run test/pummel/test-hash-seed by switching
from spawnSync() to spawn(). On my computer, this reduces the runtime
from about 80 seconds to about 40 seconds. This test is not (yet) run
regularly on CI, but when it was run recently, it timed out.

PR-URL: https://github.com/nodejs/node/pull/25522
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-01-17 16:14:45 -08:00
Rich Trott
5fdd554730 test: add check for wrk to test-keep-alive
test/pummel/test-keep-alive.js requires `wrk` to be installed. Check if
it is, and skip the test if it isn't.

This is yet another step in preparation for running pummel tests in CI
daily.

PR-URL: https://github.com/nodejs/node/pull/25516
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-17 16:13:04 -08:00
Rich Trott
391f839563 test: refactor pummel/test-net-pingpong
* Use port 0 instead of `common.PORT`.
* Use `//` for comments, capitalize comments, and add punctuation.

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:22 -08:00
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
Rich Trott
b39234a4a8 test: refactor pummel/test-net-connect-econnrefused
* Reduce ROUNDS and ATTEMPTS_PER_ROUND by half to avoid spurious test
  failures as a result of side effects from other tests. (For my local
  setup, test-keep-alive seems to cause this test to fail with ETIMEDOUT
  and/or EADDRNOTAVAIL. It would seem to be a result of throttling.
  Reducing the pummel-iness of that test and this one seems to solve the
  problem.)
* Apply capitalization and punctuation to comment.

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:15 -08:00
Rich Trott
46fb276529 test: refactor pummel/test-keep-alive
* Reduce concurrent and duration options by half so as to avoid
  interference with other tests. (Excessive TCP activity in this test
  resulted in throttling that caused subsequent tests to fail on my
  local setup.)
* Use an OS-provided port rather than `common.PORT`. This possibly
  reduces side-effects on other tests (that may also be using
  `common.PORT`).
* Add punctuation in comments.

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:12 -08:00
Rich Trott
c24fccf064 test: fix test-net-connect-econnrefused (again)
test-net-connect-econnrefused was recently fixed, but only in certain
circumstances. This change allows it to succeed whether it is invoked
with `node` or `tools/test.py`. Makes sure no Socket handles are left,
which is what the test is trying to determine, rather than failing if
there are no handles of any kind left.

PR-URL: https://github.com/nodejs/node/pull/25438
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-12 16:21:41 -08:00
Rich Trott
b2f74f73f3 test: fix test-net-connect-econnrefused
test/pummel/test-net-connect-econnrefused.js was failing because
`console.log()` resulted in an extra handle being returned by
`process._getActiveHandles()`. Remove the unnecessary `console.log()`.

PR-URL: https://github.com/nodejs/node/pull/25389
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-01-10 11:39:38 -08:00
Rich Trott
0a11f1b6a6 test: remove test/pummel/test-http-client-reconnect-bug.js
test-http-client-reconnect-bug depends on `http.createClient()` which
was removed in Node.js 7.0.0. The test was added way back in commit
30b0522157 for a bug fixed in Node.js
0.1.27 in early 2010. We've apparently been fine with it failing since
at least Node.js 7.0.0 which at this time is more than 2 years ago.

Remove this test.

PR-URL: https://github.com/nodejs/node/pull/25387
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-01-10 11:37:15 -08:00
Rich Trott
fa5af0d508 test: refactor test-fs-watch-non-recursive
The test was duplicating some functionality in the `tmpdir` module.

PR-URL: https://github.com/nodejs/node/pull/25386
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-09 22:19:23 -08:00
Rich Trott
82f03f89b4 test: fix test/pummel/test-fs-watch-non-recursive.js
test-fs-watch-non-recursive was loading the `common/tmpdir` module as if
it were a built-in and was failing because of it. Fix the path. The test
now works.

PR-URL: https://github.com/nodejs/node/pull/25386
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-09 22:19:20 -08:00
Rich Trott
e18b461965 test: fix test/pummel/test-fs-watch-file.js
test-fs-watch-file.js fails for two reasons. First, there are cases
where it is checking the error message for an error whose message has
changed since the test was written. Change these instances to check for
an error code instead.

Second, there is an instance where it tries to remove a listener but
fails because `common.mustNotCall()` returns a differnet instance of a
function on each call. Store the function in a variable name so it can
be removed as a listener on a file.

PR-URL: https://github.com/nodejs/node/pull/25384
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-09 20:48:45 -08:00
Rich Trott
284b20bf75 test: fix test/pummel/test-fs-largefile.js
test-fs-largefile.js calls `fs.close()` without a callback which results
in an error as of Node.js 10.0.0. Add a `common.mustCall()` callback so
the test passes again.

PR-URL: https://github.com/nodejs/node/pull/25372
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-01-09 13:50:17 -08:00
Rich Trott
0066fdb072 test: move test-tls-securepair-client out of pummel
test-tls-securepair-client does not seem to need to be in the pummel
directory. Move it to sequential. (It can't go into parallel because it
uses common.PORT and therefore might conflict with another test that is
using system-assigned available ports.)

PR-URL: https://github.com/nodejs/node/pull/25222
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-07 11:36:39 -08:00
Rich Trott
a5c9491e73 test: fix test-tls-securepair-client
test-tls-securepair-client has been failing for over a year but no one
noticed because pummel tests are almost never run.

In preparation for running pummel tests once a day in CI, fix
test-tls-securepair-client.

PR-URL: https://github.com/nodejs/node/pull/25222
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-07 11:36:35 -08:00
Rich Trott
9391638f88 test: fix test-tls-session-timeout
Tests in pummel seem to break often and stay broken because they don't
get run in CI. In preparation for running pummel tests in CI once a day,
this fixes test-tls-session-timeout. `key` and `cert` are now the
contents of the relevant files and not the paths.

PR-URL: https://github.com/nodejs/node/pull/25188
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-12-24 21:50:28 -08:00
Ruben Bridgewater
50dd555910
doc,lib,test: capitalize comment sentences
This activates the eslint capitalize comment rule for comments
above 50 characters.

PR-URL: https://github.com/nodejs/node/pull/24996
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-17 17:14:35 +01:00
Ruben Bridgewater
1f85ea979c
tools: capitalize sentences
This adds the `capitalized-comments` eslint rule to verify that
actual sentences use capital letters as starting letters. It ignores
special words and all lines below 62 characters.

PR-URL: https://github.com/nodejs/node/pull/24808
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-12-10 17:07:18 +01:00
jamesgeorge007
afab340e67 test: convert callback to arrow function
PR-URL: https://github.com/nodejs/node/pull/24513
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-11-25 19:45:25 +05:30
sreepurnajasti
c90b514275
test: replace callback with arrow functions
PR-URL: https://github.com/nodejs/node/pull/24541
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-24 06:44:52 +09:00
Maya Anilson
4d35fa7d07 test: replace closure with arrow function
PR-URL: https://github.com/nodejs/node/pull/24489
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-22 14:01:33 +05:30
sreepurnajasti
9d34a1e3c0 test: replace callback with arrow functions
PR-URL: https://github.com/nodejs/node/pull/24490
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-22 06:12:55 +01:00
suman-mitra
0bf743a8a5 test: replace anonymous closure with arrow functions
PR-URL: https://github.com/nodejs/node/pull/24481
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-21 06:29:29 -08:00
Jay Arthanareeswaran
092ab7a1d3 test: fix the arguments order in assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/24416
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.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: James M Snell <jasnell@gmail.com>
2018-11-19 08:38:35 -08:00
NoSkillGirl
dafd76ca8f test: assertion equality fix
In test-net-write-callback.js, when process exits, we check callback
count against the expected value. The assertion is written with the
expected value first and actual value second, but that is the opposite
of the documented argument order. Reverse them to be consistent with
documentation.

PR-URL: https://github.com/nodejs/node/pull/24422
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-18 23:46:33 -08:00
Selvaraj
9801eb9e3a test: fix actual parameter order for 'assert.strictEqual'
PR-URL: https://github.com/nodejs/node/pull/24428
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-11-18 20:19:05 -08:00
Nikhil M
1b75b81649 test: swap actual&optional params
PR-URL: https://github.com/nodejs/node/pull/24426
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-11-18 10:44:36 -08:00
Marcus Scott
e492f92ec5
test: move test-fs-watch-system-limit from sequential to pummel
PR-URL: https://github.com/nodejs/node/pull/23692
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-09 16:11:51 -08:00
cjihrig
a74b4a062f
test: remove unused catch bindings
PR-URL: https://github.com/nodejs/node/pull/24079
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2018-11-06 10:59:18 -05:00
Pete Lombardo
22afe4fafc
test: fix parameter order of assertions
PR-URL: https://github.com/nodejs/node/pull/23565
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-10-15 15:34:45 +02:00
Maki Toda
ea1565e09f
test: removed unused variable in fs-watch-file-slow
PR-URL: https://github.com/nodejs/node/pull/23548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-10-15 12:08:04 +02:00
Chris Bautista
96311903e8
test: switch strictEqual parameters - actual first before expected
PR-URL: https://github.com/nodejs/node/pull/23537
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-15 12:08:04 +02:00
Allan Zheng
3c2f9ad0a1
test: reverse the order of assertion statement arguments in pingpong test
PR-URL: https://github.com/nodejs/node/pull/23540
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-15 12:08:04 +02:00
Erin Bush
d83d3ed2bc
test: swap expected and actual arguments in assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/23542
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-15 12:03:08 +02:00
Oktavianus Ludiro
08b1047ef1
test: use correct argument order for assert.strictEqual()
The previous code did not pass correct argument order to
assert.strictEqual().
Before:
First argument provided is expected value
Second argument provided is actual value

After:
First argument provided is actual value
Second argument provided is expected value

PR-URL: https://github.com/nodejs/node/pull/23527
Reviewed-By: Hitesh Kanwathirtha <digitalinfinity@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-15 12:03:08 +02:00
Diana Lee
a0aa7ada0e
test: corrected the order of arguments in assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/23528
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-15 12:03:08 +02:00
Marcos Frony
c3ebc028d2
test: reorder asserts arguments
Revert arguments for assert and ensure that the first
argument is always the actual value being tested.

PR-URL: https://github.com/nodejs/node/pull/23534
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-15 12:00:00 +02:00
Elvis-Philip N
183838d30b
test: corret assertion arg order in test-regress-GH-892.js
PR-URL: https://github.com/nodejs/node/pull/23513
Reviewed-By: James M Snell <jasnell@gmail.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
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
Illescas, Ricardo
6b3b64fa73
test: fix argument order in assertions
PR-URL: https://github.com/nodejs/node/pull/23506
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.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
Dylson Valente Neto
ede79c4cb8
test: swap the order arguments are passed to assert
Documentation for assertions rule actual values should be passed first
followed by the expected value. This commit update the assertions the
changed file contains to comply to that rule. Changes also label the
assertions.

PR-URL: https://github.com/nodejs/node/pull/23580
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-10-14 08:10:22 -07:00
Rich Trott
41ae423718 test: remove common.fileExists()
common.fileExists() can be replaced with fs.existsSync().

PR-URL: https://github.com/nodejs/node/pull/22151
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-08-08 09:17:44 -07:00