Michaël Zasso
f5b952b221
test: refactor and fix test-dns
...
* More precise length assertion.
* Fix incorrect use of string instead of RegExp in `throws` assertions.
* Add missing RegExp to `throws` assertions.
PR-URL: https://github.com/nodejs/node/pull/9811
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2016-12-27 15:07:02 -05:00
Michaël Zasso
8b733dca05
test: refactor test-crypto-binary-default
...
* var -> const.
* Group and sort imports.
* Correctly align function arguments.
* Fix incorrect use of string instead of RegExp in `throws` assertions.
* assert.equal -> assert.strictEqual.
* Verify that callbacks are called with common.mustCall.
PR-URL: https://github.com/nodejs/node/pull/9810
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2016-12-27 15:05:53 -05:00
Michaël Zasso
45af7857d7
test: refactor and fix test-crypto
...
* var -> const.
* Group and sort imports.
* Replace use of the deprecated crypto.createCredentials.
* Fix incorrect use of string instead of RegExp in `throws` assertions.
* Clone array with `.slice()` and remove dependency on util.
* assert.notEqual -> assert.notStrictEqual.
* indexOf -> includes.
PR-URL: https://github.com/nodejs/node/pull/9807
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-12-27 14:30:07 +01:00
Michaël Zasso
e0c8aafad8
test: fix test-buffer-slow
...
Fix incorrect use of string instead of RegExp in `throws` assertions.
PR-URL: https://github.com/nodejs/node/pull/9809
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-12-27 13:06:16 +01:00
Avery, Frank
e72dfce2c8
test: added validation regex argument to test
...
In this change, I've added the regex pattern to the assert.throws()
in order to provide the validation argument for the call.
PR-URL: https://github.com/nodejs/node/pull/9918
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-12-26 20:05:55 +01:00
Kailean Courtney
a779e7ffec
test: clean up repl-reset-event file
...
* Change vars to let/const
* Add mustCall
* equal -> strictEqual
* remove timeout
PR-URL: https://github.com/nodejs/node/pull/9931
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-12-26 20:05:27 +01:00
CodeVana
4022579b6e
test: improve domain-top-level-error-handler-throw
...
Use assert.strictEqual instead of assert.equal.
PR-URL: https://github.com/nodejs/node/pull/9950
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2016-12-26 20:04:32 +01:00
Amar Zavery
d3edaa3dc3
test: replace var with const in test-require-dot
...
PR-URL: https://github.com/nodejs/node/pull/9916
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
2016-12-26 20:02:56 +01:00
Michaël Zasso
8694811ef0
test: refactor test-net-pingpong
...
* var -> const.
* Verify that callbacks are called with common.mustCall.
* Replace usage of deprecated `server.connections`.
* Use common.fail instead of rethrowing errors.
* Remove console.log statements.
* assert.equal -> assert.strictEqual.
* Correct order of arguments in assert.strictEqual.
PR-URL: https://github.com/nodejs/node/pull/9812
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2016-12-21 15:13:18 -05:00
Aaron Petcoff
e849dd0ff3
test: Use strictEqual in test-tls-writewrap-leak
...
PR-URL: https://github.com/nodejs/node/pull/9666
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2016-12-21 15:05:28 -05:00
mkamakura
0662429268
test: fix test-tls-connect-address-family
...
Use port 0 instead of common.PORT.
PR-URL: https://github.com/nodejs/node/pull/9573
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2016-12-21 15:05:07 -05:00
Yosuke Saito
420e7f17d9
test: fix test-http-status-reason-invalid-chars
...
Use port 0 instead of common.PORT, and use server address
instead of localhost to follow writing test guideline.
This is a part of Code And Learn at NodeFest 2016 Challenge in Tokyo.
PR-URL: https://github.com/nodejs/node/pull/9572
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-21 15:04:42 -05:00
Rich Trott
13cace140f
test: fix helper-debugger-repl.js
...
The test `debugger/test-debugger-repl-break-in-module` (and probably
others) was failing because the handshake message for debugging is no
longer `listening on port <port>` but is instead `listening on
<address>:<port>`.
This change makes the check less strict so as to hopefully future-proof
it at least a little bit against subsequent changes.
This test failure is not caught in CI because currently debugger tests
are not run in CI.
PR-URL: https://github.com/nodejs/node/pull/9486
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com >
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
2016-12-21 15:03:51 -05:00
cjihrig
aebbc965f9
test: refactor large event emitter tests
...
This commit splits several large event emitter tests into smaller
block scoped tests. This keeps the tests more isolated. This
commit also replaces var with const, assert.equal() with
assert.stictEqual(), and other small enhancements.
PR-URL: https://github.com/nodejs/node/pull/6446
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-21 14:54:13 -05:00
Michaël Zasso
b5012f3de2
test: add expectWarning to common
...
There are multiple tests that use the same boilerplate to test that
warnings are correctly emitted. This adds a new common function to do that
and changes the tests to use it.
PR-URL: https://github.com/nodejs/node/pull/8662
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-21 14:33:59 -05:00
Michaël Zasso
b98813d97c
test: refactor test-fs-non-number-arguments-throw
...
* Add RegExp arguments to throws assertions.
* Use common.mustCall for emitter callback.
PR-URL: https://github.com/nodejs/node/pull/9844
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2016-12-21 14:33:59 -05:00
Jeremiah Senkpiel
759e8fdd18
timers: bail from intervals if _repeat is bad
...
PR-URL: https://github.com/nodejs/node/pull/10365
Ref: https://github.com/nodejs/node/pull/9685
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2016-12-21 14:33:21 -05:00
Jeremiah Senkpiel
553d95da15
timers: use consistent checks for canceled timers
...
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.
Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.
Refs: https://github.com/nodejs/node/pull/9606
Fixes: https://github.com/nodejs/node/issues/9561
PR-URL: https://github.com/nodejs/node/pull/9685
Reviewed-By: Rich Trott <rtrott@gmail.com >
Conflicts:
lib/timers.js
2016-12-21 12:55:25 -05:00
Cesar Hernandez
80a752708a
test: refactor test-dgram-exclusive-implicit-bind
...
* assert.equal() -> assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/10066
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2016-12-20 17:38:16 -05:00
anoff
9b974b4d54
test: use assert.strictEqual
...
* use `assert.strictEqual`
PR-URL: https://github.com/nodejs/node/pull/9975
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-12-20 17:29:32 -05:00
Aileen
bc125bd729
test: change assert.equal to assert.strictEqual
...
PR-URL: https://github.com/nodejs/node/pull/9946
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-12-20 17:29:13 -05:00
vazina robertson
5049a10278
test: changed assert.equal to assert.strictEqual
...
PR-URL: https://github.com/nodejs/node/pull/10015
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-12-20 17:28:52 -05:00
Jared Young
b5c60edeed
test: renamed assert.Equal to assert.strictEqual
2016-12-20 17:27:36 -05:00
Paul Graham
f44e828a36
test: improves test-tls-client-verify
...
Swaps var -> const/let
assert.equal becomes assert.strictEqual
common.mustCall on single-use functions
PR-URL: https://github.com/nodejs/node/pull/10051
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-12-20 17:27:10 -05:00
Diego Paez
a1e3967f69
test: refactor test-https-agent-session-reuse
...
Use const and let instead of var and assert.strictEqual() instead of
assert.equal()
PR-URL: https://github.com/nodejs/node/pull/10105
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-12-20 17:26:15 -05:00
Rob Adelmann
9e46af6412
test: refactor test-beforeexit-event
...
- replaced var with const/let.
- removed all console.log() statements.
- removed deaths and revivals vars.
- wrapped beforexit listener callbacks with
common.mustCall().
- removed exit event listener.
PR-URL: https://github.com/nodejs/node/pull/10121
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-12-20 17:25:52 -05:00
Daniel Sims
adcd6ea66f
test: refactor test-domain-from-timer
...
In this change, the setTimeout needed a second argument, so I set that
value to 1. In addition, I changed the assertion to be a strictEquals
instead of equals.
I changed the var declarations to const in this test.
PR-URL: https://github.com/nodejs/node/pull/9889
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2016-12-20 17:24:32 -05:00
Ethan Arrowood
1377ea87eb
test: refactor test-domain-exit-dispose-again
...
setTimeout at 49:5 requires two arguments.
On lines 72 and 73 changed assert.equal() to assert.strictEqual().
PR-URL: https://github.com/nodejs/node/pull/10003
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2016-12-20 17:24:11 -05:00
CodeVana
8a9af6843d
test: use const and strictEqual in test-os-homedir-no-envvar
...
PR-URL: https://github.com/nodejs/node/pull/9899
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-12-20 17:23:50 -05:00
Michael-Bryant Choa
ee038c0e71
test: refactor test-dgram-bind-default-address
...
- changes var to const/let
- changes assert.equal to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9947
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-20 17:23:24 -05:00
Chris Bystrek
a090899e93
test: assert.throws() should include a RegExp
...
PR-URL: https://github.com/nodejs/node/pull/997://github.com/nodejs/node/pull/9976
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-12-20 17:21:56 -05:00
Rodrigo Palma
542b40f410
test: refactor test-event-emitter-method-names
...
Improved test by using strictEqual instead of equal.
PR-URL: https://github.com/nodejs/node/pull/10027
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2016-12-20 17:21:14 -05:00
Yojan Shrestha
a2023a9d97
test: refactor tls-ticket-cluster
...
- changes var to const/let
- changes assert.equal to assert.strictEqual
- changes `notEqual` to `notStrictEqual`
PR-URL: https://github.com/nodejs/node/pull/10023
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-12-20 17:20:47 -05:00
Chris Henney
a64f40680f
test: refactor test-domain-exit-dispose
...
change equal to strictEqual, fix setTimeout
PR-URL: https://github.com/nodejs/node/pull/9938
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-12-20 17:20:23 -05:00
amrios
a896d4ed36
test: refactor test-stdin-from-file.js
...
change var to const/let
wrap common.mustCall on childProcess.exec callback
remove unneeded fs.unlinkSync()
refactor assert.equal to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/10012
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-12-20 17:19:58 -05:00
Daryl Thayil
ce14c1e51f
test: refactor test-require-extensions-main
...
* var => const
* assert test fixtures
PR-URL: https://github.com/nodejs/node/pull/9912
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2016-12-20 17:17:39 -05:00
Danny Guo
b9c45026f7
test: clean up tls junk test
...
PR-URL: https://github.com/nodejs/node/pull/9940
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-20 17:16:05 -05:00
scalkpdev
e3712334a3
test: update test-stdout-to-file
...
* changed vars to const
* changed assert.equal to assert.strictEqual
* added a common.mustCall in the childProcess.exec callback
* replaced 2 console.log strings with template strings for readability
* had to break up line 9 because it was causing a line max length (80)
listing err
PR-URL: https://github.com/nodejs/node/pull/9939
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-20 17:15:47 -05:00
Paul Chin
63f571e69c
test: changed assert.Equal to asset.strictEqual
...
test-dgram-send-callback-recursive.js
PR-URL: https://github.com/nodejs/node/pull/9973
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-12-20 17:15:25 -05:00
Wes Tyler
c3a3480606
test: refactor test-domain-multi
...
Replace assert.equal() with assert.strictEqual().
PR-URL: https://github.com/nodejs/node/pull/9963
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2016-12-20 17:15:00 -05:00
Nigel Kibodeaux
ad27555ff8
test: use assert.strictEqual in test-cli-eval
...
PR-URL: https://github.com/nodejs/node/pull/9919
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-20 17:13:26 -05:00
Russell Sherman
cffd51e815
test: refactor test-tls-connect-simple
...
refactor var -> const/let
refactor process.on('exit') into common.mustCall
PR-URL: https://github.com/nodejs/node/pull/9934
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-20 17:13:05 -05:00
mark hughes
1424c25f3e
test: refactor test-signal-unregister
...
* var -> const
* assert.equal() -> assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/9920
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2016-12-20 17:12:46 -05:00
blugavere
920737180f
test: refactor test-require-resolve
...
* var => const
* assert.equal() => assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/10120
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-20 17:11:59 -05:00
Matt Webb
71ab88cc80
test: refactor test-fs-read-stream-resume
...
Update vars to const/let & equal to strictEqual.
PR-URL: https://github.com/nodejs/node/pull/9927
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-20 17:11:21 -05:00
Tracy Hinds
6a485da87c
test: replace equal with strictEqual
...
PR-URL: https://github.com/nodejs/node/pull/10011
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-20 17:11:01 -05:00
Uttam Pawar
b5d87569e1
test: use strictEqual instead of equal
...
PR-URL: https://github.com/nodejs/node/pull/9921
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-20 17:10:47 -05:00
Fabrice Tatieze
c94c2fde8a
test: using const and strictEqual
...
PR-URL: https://github.com/nodejs/node/pull/9926
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-20 17:09:49 -05:00
Richard Karmazin
16164b5b44
test: test-file-write-stream3.js refactor
...
PR-URL: https://github.com/nodejs/node/pull/10035
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-12-20 17:08:49 -05:00
Erez Weiss
7391983729
test: implemented es6 conventions
...
implemented arrow functions and changed var to const where
appropriate.
PR-URL: https://github.com/nodejs/node/pull/9669
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-12-20 17:07:55 -05:00