Masashi Hirano
fb3f6005c0
test: fix ineffective error tests
...
Fix tests whether errors are thrown correctly
because they are successful when error doesn't get thrown.
PR-URL: https://github.com/nodejs/node/pull/27333
Fixes: https://github.com/nodejs/node/issues/26385
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-04-24 10:07:09 +02:00
shisama
70beb76f92
tools: add no-var lint rule for tools directory
...
PR-URL: https://github.com/nodejs/node/pull/26398
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-07 00:35:02 +01:00
Masashi Hirano
ce8f01cf0c
tools: replace var to let/const
...
PR-URL: https://github.com/nodejs/node/pull/26398
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-07 00:35:01 +01:00
Masashi Hirano
63b06551f4
src,lib: make process.binding('config') internal
...
PR-URL: https://github.com/nodejs/node/pull/23400
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-12-05 11:47:05 -08:00
Masashi Hirano
1e23e3ceb3
fs: make process.binding('fs') internal
...
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22478
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2018-11-16 21:56:29 +09:00
Masashi Hirano
a49b672aad
doc: add shisama to collaborators
...
PR-URL: https://github.com/nodejs/node/pull/24136
Fixes: https://github.com/nodejs/node/issues/23850
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2018-11-07 00:20:38 +09:00
Masashi Hirano
a8530bc4e0
test: error when empty buffer is passed to filehandle.read()
...
Added tests to occur error when empty buffer is passed to
filehandle.read() to increase coverage.
PR-URL: https://github.com/nodejs/node/pull/23250
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-10-10 13:50:30 +02:00
Masashi Hirano
d71dd97263
util: support BigInt in util.format
...
`util.format` and `console.log` now support BigInt via the existing
format specifiers `%i` and `%d`.
PR-URL: https://github.com/nodejs/node/pull/22097
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-09 20:11:48 +02:00
shisama
097896bafe
test: error when empty buffer is passed to fs.read()
...
Added tests to occur error when empty buffer is passed to fs.read()
to increase coverage.
PR-URL: https://github.com/nodejs/node/pull/23141
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-03 08:32:07 +02:00
Masashi Hirano
a58f37720d
test: add dns.onlookupall() to increase coverage
...
Added test that callback should be called when error occurs
in dns.lookupall().
PR-URL: https://github.com/nodejs/node/pull/22985
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-09-27 05:40:12 +02:00
Masashi Hirano
0623aabbe1
test: add tests to check error in dns.lookupService.
...
Added tests to check error in dns.lookupService to
increase coverage.
PR-URL: https://github.com/nodejs/node/pull/22908
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-09-20 06:33:19 +02:00
Masashi Hirano
fdf829eea4
test: check parameter type of fs.mkdir()
...
Added tests to check parameter type of fs.mkdir(), fs.mkdirSync()
and fsPromises.mkdir() to increase coverage.
PR-URL: https://github.com/nodejs/node/pull/22616
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-09-04 17:58:32 +01:00
Masashi Hirano
4dc8467dbb
test: add test unknown credential error of process.setgroups
...
Added test to check ERR_UNKNOWN_CREDENTIAL of process.setgroups to
increase coverage.
PR-URL: https://github.com/nodejs/node/pull/22368
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-24 14:51:27 +02:00
Masashi Hirano
2118342346
test: add tests for dnsPromises.lookup
...
Added tests for dnsPromises.lookup to increase coverage and test
`onlookup()` and `onlookupall()` methods.
PR-URL: https://github.com/nodejs/node/pull/21559
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-24 14:42:17 +02:00
Masashi Hirano
0b85435c01
test: check arg type for dnsPromises.resolve
...
PR-URL: https://github.com/nodejs/node/pull/22000
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-06 23:53:21 -07:00
Masashi Hirano
4e1c4e8193
dns: type check for dns.setServers argument.
...
Added type check for argument for dns.setServers and dnsPromises.setServers.
PR-URL: https://github.com/nodejs/node/pull/21944
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2018-08-03 08:34:10 -07:00
shisama
a4ce449bb7
test: add tests for fs/promises chown functions
...
To increase test coverage for fs/promises, add tests for
methods chown(), filehandle.chown() and lchown().
PR-URL: https://github.com/nodejs/node/pull/20574
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
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: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-07-30 13:11:47 -04:00
Masashi Hirano
71ca076ca7
test: add filehandle sync() and datasync() tests
...
To increase test coverage for fs.promises,
added tests for filehandle.sync and filehandle.datasync.
PR-URL: https://github.com/nodejs/node/pull/20530
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-07-15 16:35:13 +02:00
Masashi Hirano
1f1675817c
test: check option start or end is not safe integer
...
To increase fs readstream coverage, added test to check error when
option.start or end is not safe integer.
PR-URL: https://github.com/nodejs/node/pull/21704
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-11 00:43:12 +02:00
Masashi Hirano
f54958ef2f
fs: fix fsPromises.lchmod error on non-Mac
...
On non-macOS, fsPromises.lchmod throws AssertionError.
Expected behavior is `Error [ERR_METHOD_NOT_IMPLEMENTED]`.
`ERR_METHOD_NOT_IMPLEMENTED()` requires argument, but it wasn't set.
Fixes `ERR_METHOD_NOT_IMPLEMENTED()` to
`ERR_METHOD_NOT_IMPLEMENTED('lchmod()')`.
PR-URL: https://github.com/nodejs/node/pull/21435
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
2018-07-10 20:01:11 +03:00
Masashi Hirano
0b2ad91ad3
test: check type for Worker filename argument
...
Add test to check type for first argument of Worker to increase
coverage.
PR-URL: https://github.com/nodejs/node/pull/21620
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-07-04 00:51:21 -07:00
Masashi Hirano
383b1b6d3c
test: add tests for end event of stream.Duplex
...
Added tests to check the stream will automatically end the writable side
when readable side ends when allowHalfOpen option is false.
PR-URL: https://github.com/nodejs/node/pull/21325
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-06-22 13:25:48 -07:00
Masashi Hirano
2066cd42b6
test: assert process.setgroups is undefined on windows
...
PR-URL: https://github.com/nodejs/node/pull/21286
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-21 06:28:44 -07:00
Masashi Hirano
77bbdfd409
test: add tests for process.setgroups()
...
Added tests to validate process.setgroups() arguments
PR-URL: https://github.com/nodejs/node/pull/21286
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-21 06:28:36 -07:00
Masashi Hirano
271a861e05
test: add test to check colorMode type of Console
...
PR-URL: https://github.com/nodejs/node/pull/21248
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
2018-06-14 18:53:34 +02:00
Masashi Hirano
262f3777ce
test: improve internal/buffer.js test coverage
...
Added tests buffer.js methods to write 48 bit value to
improve test coverage.
PR-URL: https://github.com/nodejs/node/pull/21061
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
2018-06-04 11:44:28 -04:00
Masashi Hirano
42adb65d2f
test: string-decorater.lastChar
...
Added test for string-decorater.lastChar to improve coverage.
PR-URL: https://github.com/nodejs/node/pull/21084
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-04 10:37:46 -04:00
Masashi Hirano
75f6ef9f6f
src: fix typo string_search.h comment
...
PR-URL: https://github.com/nodejs/node/pull/21115
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-04 00:52:56 +02:00
Masashi Hirano
e5a3579a50
test: increase coverage for fs.promises.truncate
...
To increase test coverage, added tests for fs.promises.truncate
and FileHandle.truncate.
PR-URL: https://github.com/nodejs/node/pull/20638
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-30 19:08:42 +02:00
Masashi Hirano
6558dcbf75
test: add test for fs.promises.lchmod
...
To increase test coverage for fs.promises by adding a test for
lchmod.
PR-URL: https://github.com/nodejs/node/pull/20584
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-05-30 19:01:48 +02:00
Masashi Hirano
ac8226115e
doc: fix filehandle.truncate() sample codes
...
PR-URL: https://github.com/nodejs/node/pull/20913
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-05-25 00:41:37 +03:00
Masashi Hirano
f51c44d325
test: improve coverage for readline.Interface
...
Add tests in parallel/test-readline-interface to increase coverage
PR-URL: https://github.com/nodejs/node/pull/20704
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-23 11:17:19 -07:00
Masashi Hirano
731c55a08e
test: improve coverage for internal/readline
...
Add tests for readline keys to improve coverage.
PR-URL: https://github.com/nodejs/node/pull/20840
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2018-05-22 12:26:12 +04:00
Masashi Hirano
3b1bf0d394
tools: fix "the the" typos in comments
...
PR-URL: https://github.com/nodejs/node/pull/20716
Fixes: https://github.com/nodejs/node/issues/20682
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-16 09:08:37 +04:00
Masashi Hirano
6ec43fc28b
test: fix common.canCreateSymLink() on non-Windows
...
test/common/README.md indicates that canCreateSymlink() always returns
true on non-Windows platforms. However, prior to this commit, undefined
was being returned. This commit aligns the implementation with the
docs by returning true.
PR-URL: https://github.com/nodejs/node/pull/20511
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-05 10:38:44 -04:00
Masashi Hirano
f74b344a24
test: add fs/promises filehandle stat test
...
Added test for fs/promises filehandle stat.
PR-URL: https://github.com/nodejs/node/pull/20492
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-05 04:12:42 -07:00