Yagiz Nizipli
25c0c8e18a
http: runtime deprecate instantiating without new
...
Promote DEP0195 from documentation-only to a runtime deprecation.
Calling node:http constructors without `new` now emits DEP0195 via
deprecateInstantiation. This covers Agent, Server, OutgoingMessage,
IncomingMessage, ServerResponse, and ClientRequest.
Update in-tree tests that called Server/Agent without `new` to use
the keyword, and add a dedicated DEP0195 coverage test.
Refs: https://github.com/nodejs/node/pull/58518
Assisted-by: Grok
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com >
PR-URL: https://github.com/nodejs/node/pull/64853
Reviewed-By: Aviv Keller <me@aviv.sh >
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2026-08-01 21:42:59 +00:00
Antoine du Hamel
f1f6f3df84
test: ensure assertions are reached on more tests
...
PR-URL: https://github.com/nodejs/node/pull/60641
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-11-11 09:56:18 +00:00
Antoine du Hamel
572cc6fa55
test: ensure assertions are reached on more tests
...
PR-URL: https://github.com/nodejs/node/pull/60498
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2025-11-07 16:22:01 +00:00
Daeyeon Jeong
b4d5f1f26d
cluster: use ObjectPrototypeHasOwnProperty
...
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/48141
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-05-25 16:04:19 +00:00
Rich Trott
e2e2bc83c0
test: use Object.hasOwn() where applicable
...
Replace Object.prototpye.hasOwnProperty() with Object.hasOwn() where
applicable.
PR-URL: https://github.com/nodejs/node/pull/41664
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tierney Cyren <hello@bnb.im >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-01-25 07:03:17 +00:00
Rich Trott
55ceaec111
tools,benchmark,lib,test: enable no-case-declarations lint rule
...
PR-URL: https://github.com/nodejs/node/pull/41385
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Tierney Cyren <hello@bnb.im >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-01-05 07:42:19 -08:00
Michael Dawson
15164cebce
lib,src: update cluster to use Parent
...
Doc deprecate isMaster and setupMaster in favor
of isPrimary and setupPrimary.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/36478
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
2021-01-05 15:41:45 -05:00
Weijia Wang
254058109f
tools: add 'spaced-comment' into eslint rules
...
PR-URL: https://github.com/nodejs/node/pull/19596
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-04-01 22:33:13 +08:00
Vse Mozhet Byt
c9da05d37b
test: add missing spaces in concatenations
...
PR-URL: https://github.com/nodejs/node/pull/16244
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-10-17 12:41:03 +03:00
Daniele Lisi
0662ebeef9
test: add NODE_UNIQUE_ID value to err message
...
PR-URL: https://github.com/nodejs/node/pull/15914
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-10-09 02:13:17 -07:00
Rich Trott
3b727aaa49
test: refactor test-cluster-basic
...
* Use common.mustNotCall() to check that callback is not invoked.
* Add space per test writing guide.
PR-URL: https://github.com/nodejs/node/pull/13905
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-28 20:04:40 -07:00
Rich Trott
c05e5bfa7b
test: remove common.PORT from test-cluster-basic
...
Use of `common.PORT` in `parallel` tests is not completely safe (because
the same port can be previously assigned to another test running in
parallel if that test uses port `0` to get an arbitrary available port).
Remove `common.PORT` from test-cluster-basic.
PR-URL: https://github.com/nodejs/node/pull/12377
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-14 22:08:58 -07:00
James M Snell
4f2e372716
test: add common.noop, default for common.mustCall()
...
Export a new common.noop no-operation function for general use.
Allow using common.mustCall() without a fn argument to simplify
test cases.
Replace various non-op functions throughout tests with common.noop
PR-URL: https://github.com/nodejs/node/pull/12027
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2017-03-26 12:47:15 -07: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
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
James M Snell
baa0ffdab3
test: refactor/cleanup a number of cluster tests
...
* Move shared code into common
* Favor use of strictEqual
* Add some missing common.mustCalls
* Other general cleanup
PR-URL: https://github.com/nodejs/node/pull/8261
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2016-09-01 07:13:47 -07:00
Rich Trott
5b63d48e9e
lib,benchmark,test: implement consistent braces
...
This change is in preparation for lint-enforced brace style.
PR-URL: https://github.com/nodejs/node/pull/7630
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2016-07-12 10:33:29 -07:00
Rich Trott
8f56958658
test,tools: adjust function argument alignment
...
In preparation for a lint rule enforcing function argument alignment,
adjust function arguments to be aligned.
PR-URL: https://github.com/nodejs/node/pull/6390
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Imran Iqbal <imran@imraniqbal.org >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ryan Graham <r.m.graham@gmail.com >
2016-04-28 14:42:51 -07:00
Rich Trott
a7335bd1f0
test,benchmark: use deepStrictEqual()
...
In preparation for a lint rule that will enforce
assert.deepStrictEqual() over assert.deepEqual(), change tests and
benchmarks accordingly. For tests and benchmarks that are testing or
benchmarking assert.deepEqual() itself, apply a comment to ignore the
upcoming rule.
PR-URL: https://github.com/nodejs/node/pull/6213
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-04-22 14:38:09 -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
Fedor Indutny
0e19476595
test: split test in parallel/sequential
...
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
PR-URL: https://github.com/iojs/io.js/pull/172
Fix : iojs/io.js#139
2014-12-17 20:45:02 +07:00