Commit Graph

4776 Commits

Author SHA1 Message Date
Rich Trott
cdeb85efc2 test: move long-running test to sequential
test-buffer-creation-regression is flaky on some SmartOS hosts in CI,
timing out. Move to sequential so it does not compete with other tests
for resources. Reduce three test cases to just the one needed to
identify the regression.

PR-URL: https://github.com/nodejs/node/pull/10161
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
2016-12-07 07:35:29 -08:00
Chris Bystrek
7d26c2799b test: assert.throws() should include a RegExp
PR-URL: https://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-07 07:33:43 -08:00
Sam Shull
4f486aa661 test: invalid package.json causes error when require()ing in directory
Requiring a file from a directory that contains an invalid package.json
file should throw an error.

PR-URL: https://github.com/nodejs/node/pull/10044
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-07 10:00:11 -05:00
Richard Karmazin
00ea286800 test: refactor test-listen-fd-ebadf
Replace var with const and assert.equal with assert.strictEqual.

PR-URL: https://github.com/nodejs/node/pull/10034
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-12-07 06:45:23 -06:00
Rodrigo Palma
ee8848ddb6 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-07 06:41:07 -06:00
Yojan Shrestha
0c4c225b43 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-07 09:19:53 +01:00
Chris Henney
25dfb8e570 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-06 20:56:53 -08:00
amrios
e4b88d10b7 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-06 20:30:34 -08:00
Eugene Ostroukhov
42da740ed8 inspector: split HTTP/WS server from the inspector
Both our team experiments and some embedder request indicate a potential
in implementing alternative transport for inspector - e.g. IPC pipes or
custom embedder APIs. This change moves all HTTP specific code into a
separate class and is a first attempt at defining a boundary between the
inspector agent and transport. This API will be refined as new
transports are implemented.
Note that even without considering alternative transports, this change
enables better testing of the HTTP server (Valgrind made it possible to
identify and fix some existing memory leaks).

PR-URL: https://github.com/nodejs/node/pull/9630
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-12-06 14:47:49 -08:00
Eugene Ostroukhov
2f3865d5f5 inspector: check if connected before waiting
Fixes: https://github.com/nodejs/node/issues/10093
PR-URL: https://github.com/nodejs/node/pull/10094
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-12-06 14:28:20 -08:00
Jason Humphrey
a1bd070f87 test: use ES6 to update let & const
Also updating assertStrict and moving the assert required.

PR-URL: https://github.com/nodejs/node/pull/9917
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2016-12-06 13:03:39 -08:00
joyeecheung
a3a3937d76 test: fix test for buffer regression #649
pass a regexp to assert.throws()

PR-URL: https://github.com/nodejs/node/pull/9924
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-06 13:00:28 -08:00
Deepti Agrawal
9765dd4bda test: update parallel/test-crypto-hash.js
changed equal to strictEqual in parallel/test-crypto-hash.js.
Added a second regex argument to the assert.throws function.

PR-URL: https://github.com/nodejs/node/pull/10009
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-12-06 09:01:19 -08:00
Daryl Thayil
f8e07d0486 test: add test for url module domainToAscii and domainToUnicode
PR-URL: https://github.com/nodejs/node/pull/10031
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-06 07:43:56 -08:00
Daryl Thayil
81661a7ac7 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-06 07:39:41 -08:00
k3kathy
ffd64adc78 test: refactor test-tls-ocsp-callback
refactor all var to either const/let
change all assert.equal to assert.strictEqual
change all assert.ok(...===...) to assert.strictEqual

PR-URL: https://github.com/nodejs/node/pull/9970
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-06 07:31:20 -08:00
Matt Phillips
f7a35df171 test: use assert.strictEqual and fix setTimeout
Changes assert.equal to assert.strictEqual in
two places and adds a second argument of 0
to setTimeout

PR-URL: https://github.com/nodejs/node/pull/9957
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-06 07:29:19 -08:00
Danny Guo
244dd5b589 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-06 07:25:47 -08:00
scalkpdev
858c4f7fec 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-06 07:08:05 -08:00
Paul Chin
df659995a8 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-06 10:01:07 -05:00
Wes Tyler
c26419ba37 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-06 08:33:38 -06:00
Teddy Katz
9d493d0064 repl: avoid parsing division operator as regex
This improves the heuristic used in multiline-prompt mode to determine
whether a given slash character is at the beginning of a regular
expression.

PR-URL: https://github.com/nodejs/node/pull/10103
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: James M Snell <jasnell@keybase.io>
Fixes: https://github.com/nodejs/node/issues/9300
2016-12-06 02:26:24 -05:00
hirabhullar
7a23c0a800 test: refactor test-fs-write.js
Changed var to const and equal to strictEqual

PR-URL: https://github.com/nodejs/node/pull/9982
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 22:55:34 -08:00
hirabhullar
108314b48f test: refactor test-child-fork-exec-path.js
Changed equal to strictEqual

PR-URL: https://github.com/nodejs/node/pull/9982
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 22:55:11 -08:00
Nigel Kibodeaux
95ac3bdfea 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-05 22:45:48 -08:00
Russell Sherman
d648f2b6d7 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-05 22:43:08 -08:00
mark hughes
b074ae2e8d 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-05 22:30:41 -08:00
Punit Buch
3eacb2d3c4 test: update test-net-connect-handle-econnrefused
* var -> const
* assert.equal() -> assert.strictEqual()
* assert.ok(false) -> common.fail()

PR-URL: https://github.com/nodejs/node/pull/9932
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 22:01:38 -08:00
blugavere
2df3fd9856 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-05 21:57:16 -08:00
Walter Beller-Morales
b91ca7d108 test: refactor test-fs-symlink-dir-junction
* var -> const
* assert.equal() -> assert.strictEqual()

PR-URL: https://github.com/nodejs/node/pull/9928
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 21:49:26 -08:00
Matt Webb
8be9d68457 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-05 21:44:04 -08:00
Tracy Hinds
5247a0b9a8 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-05 19:54:13 -08:00
Uttam Pawar
27c0a0ca9d 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-05 19:50:14 -08:00
Fabrice Tatieze
f6d15b033b 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-05 19:46:30 -08:00
Jonathan Darling
6ed0e8b49c test: convert assert.equal to assert.strictEqual
converts an instance of assert.equal in a file already mostly
updated to use assert.strictEqual

PR-URL: https://github.com/nodejs/node/pull/9925
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 19:41:09 -08:00
Scott Smereka
6eee34a168 test: changed assert.equal to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9936
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 19:37:56 -08:00
Anna Henningsen
69b1a76ddd buffer: fix transcode for single-byte enc to ucs2
Fix `buffer.transcode()` for transcoding from single-byte character
encodings to UCS2.

These would previously perform out-of-bounds reads due to an
incorrect `sizeof()` expression.

Fixes: https://github.com/nodejs/node/issues/9834
PR-URL: https://github.com/nodejs/node/pull/9838
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-06 01:42:08 +01:00
Richard Karmazin
18cf668d40 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-05 15:35:09 -08:00
Erez Weiss
ef74e03b2a 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-05 15:18:17 -08:00
J Scott Chapman
cc1fa7a74d test: strictEqual() and RegExp in test-buffer-fill.js
Used assert.strictEqual() instead of assert.equal()
Passed a RegExp to assert.throws()
Broke lines to satisfy linting

PR-URL: https://github.com/nodejs/node/pull/9895
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 15:16:09 -08:00
Ilya Potuzhnov
0a265df934 test: Modernize test-tls-peer-certificate.js
Modernize `test/parallel/test-tls-peer-certificate.js` according to the
following rules:
* `var` --> `const`/`let`
* `assert.equal` --> `assert.strictEqual`
* `assert.ok(a === b)` --> `assert.strictEqual(a, b)`

PR-URL: https://github.com/nodejs/node/pull/10014
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-05 17:54:02 -05:00
Michael Alexander
02a4c081e9 test: strictCompare and explcit inputs mprovement to test-buffer-slice
* change implicit string equal() compares to strictEqual compares of
  buffer output (the slice output default)
* explicitly create buffers from utf8 inputs for the compare

PR-URL: https://github.com/nodejs/node/pull/10048
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 14:33:21 -08:00
Jonathan Darling
3ae0900142 test: add test for process.stdin.setRawMode()
adds a basic test for process.stdin.setRawMode to ensure that the isRaw
property is properly changed

PR-URL: https://github.com/nodejs/node/pull/10037
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 14:23:15 -08:00
Julian Duque
1d766b8f5d test: refactor test for net listen on fd0
Replace var to const/let, use common.mustCall on callbacks and move
process.on('exit') to the .on('error') handler

PR-URL: https://github.com/nodejs/node/pull/10025
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 14:11:08 -08:00
Peter Diaz
acc2c2ff1b test: update assert.equal() to assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/10024
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 14:08:48 -08:00
Christopher Rokita
8a3c7d76b3 test: use const or let and assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/10001
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 13:47:14 -08:00
levsoroka
ee97f84c83 test: fix buffer alloc tests
Replaced assert.equal to assert.strictEqual.
Fixed assert.throws syntax and added second argument

PR-URL: https://github.com/nodejs/node/pull/9998
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 13:43:50 -08:00
Paul Lucas
0c45959a95 test: Added more validations to setEncoding
* Added more strict validations to properly test setEncoding
* Changed all var usage to const or let
* Changed assert.equal to assert.strictEqual

PR-URL: https://github.com/nodejs/node/pull/9997
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 13:38:43 -08:00
cdnadmin
40daf6bccf test: use strictEqual() domain-http
did this at nina 2016 na code and learn event

PR-URL: https://github.com/nodejs/node/pull/9996
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 13:35:01 -08:00
fmizzell
72db343be2 test: refactor test-cluster-worker-events
Use assert.strictEqual() instead of assert.equal()

PR-URL: https://github.com/nodejs/node/pull/9994
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 13:23:08 -08:00