Skip to content

Commit 4f6dd96

Browse files
TrottMylesBorins
authored andcommittedJan 2, 2018
test,doc: do not indicate that non-functions "return" values
Update documentation for test `common` module so that properties that are not functions do not specify a return type and functions that do return values specify the type. PR-URL: #17267 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 99af46e commit 4f6dd96

File tree

1 file changed

+44
-42
lines changed

1 file changed

+44
-42
lines changed
 

‎test/common/README.md

+44-42
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ A stream to push an array into a REPL
2626

2727
Blocks for `time` amount of time.
2828

29-
### canCreateSymLink
30-
API to indicate whether the current running process can create
31-
symlinks. On Windows, this returns false if the process running
32-
doesn't have privileges to create symlinks (specifically
33-
[SeCreateSymbolicLinkPrivilege](https://msdn.microsoft.com/en-us/library/windows/desktop/bb530716(v=vs.85).aspx)).
34-
On non-Windows platforms, this currently returns true.
29+
### canCreateSymLink()
30+
* return [&lt;Boolean>]
31+
32+
Checks whether the current running process can create symlinks. On Windows, this
33+
returns `false` if the process running doesn't have privileges to create
34+
symlinks
35+
([SeCreateSymbolicLinkPrivilege](https://msdn.microsoft.com/en-us/library/windows/desktop/bb530716(v=vs.85).aspx)).
36+
On non-Windows platforms, this always returns `true`.
3537

3638
### crashOnUnhandledRejection()
3739

@@ -46,9 +48,9 @@ failures.
4648
Platform normalizes the `dd` command
4749

4850
### enoughTestMem
49-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
51+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
5052

51-
Check if there is more than 1gb of total memory.
53+
Indicates if there is more than 1gb of total memory.
5254

5355
### expectsError(settings)
5456
* `settings` [&lt;Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
@@ -81,7 +83,7 @@ Tests whether `name` and `expected` are part of a raised warning.
8183
Checks if `pathname` exists
8284

8385
### fixturesDir
84-
* return [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
86+
* [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
8587

8688
Path to the 'fixtures' directory.
8789

@@ -92,37 +94,37 @@ Path to the 'fixtures' directory.
9294
Returns an instance of all possible `ArrayBufferView`s of the provided Buffer.
9395

9496
### globalCheck
95-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
97+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
9698

97-
Turn this off if the test should not check for global leaks.
99+
Set to `false` if the test should not check for global leaks.
98100

99101
### hasCrypto
100-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
102+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
101103

102-
Checks for 'openssl'.
104+
Indicates whether OpenSSL is available.
103105

104106
### hasFipsCrypto
105-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
107+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
106108

107-
Checks `hasCrypto` and `crypto` with fips.
109+
Indicates `hasCrypto` and `crypto` with fips.
108110

109111
### hasIPv6
110-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
112+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
111113

112-
Checks whether `IPv6` is supported on this platform.
114+
Indicates whether `IPv6` is supported on this platform.
113115

114116
### hasMultiLocalhost
115-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
117+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
116118

117-
Checks if there are multiple localhosts available.
119+
Indicates if there are multiple localhosts available.
118120

119121
### inFreeBSDJail
120-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
122+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
121123

122124
Checks whether free BSD Jail is true or false.
123125

124126
### isAix
125-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
127+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
126128

127129
Platform check for Advanced Interactive eXecutive (AIX).
128130

@@ -133,54 +135,54 @@ Platform check for Advanced Interactive eXecutive (AIX).
133135
Attempts to 'kill' `pid`
134136

135137
### isFreeBSD
136-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
138+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
137139

138140
Platform check for Free BSD.
139141

140142
### isLinux
141-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
143+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
142144

143145
Platform check for Linux.
144146

145147
### isLinuxPPCBE
146-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
148+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
147149

148150
Platform check for Linux on PowerPC.
149151

150152
### isOSX
151-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
153+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
152154

153155
Platform check for macOS.
154156

155157
### isSunOS
156-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
158+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
157159

158160
Platform check for SunOS.
159161

160162
### isWindows
161-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
163+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
162164

163165
Platform check for Windows.
164166

165167
### isWOW64
166-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
168+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
167169

168170
Platform check for Windows 32-bit on Windows 64-bit.
169171

170172
### leakedGlobals
171-
* return [&lt;Array>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
173+
* [&lt;Array>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
172174

173-
Checks whether any globals are not on the `knownGlobals` list.
175+
Indicates whether any globals are not on the `knownGlobals` list.
174176

175177
### localhostIPv4
176-
* return [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
178+
* [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
177179

178-
Gets IP of localhost
180+
IP of `localhost`.
179181

180182
### localIPv6Hosts
181-
* return [&lt;Array>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
183+
* [&lt;Array>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
182184

183-
Array of IPV6 hosts.
185+
Array of IPV6 representations for `localhost`.
184186

185187
### mustCall([fn][, exact])
186188
* `fn` [&lt;Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) default = () => {}
@@ -218,9 +220,9 @@ Returns a function that triggers an `AssertionError` if it is invoked. `msg` is
218220
Returns `true` if the exit code `exitCode` and/or signal name `signal` represent the exit code and/or signal name of a node process that aborted, `false` otherwise.
219221

220222
### opensslCli
221-
* return [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
223+
* [&lt;Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
222224

223-
Checks whether 'opensslCli' is supported.
225+
Indicates whether 'opensslCli' is supported.
224226

225227
### platformTimeout(ms)
226228
* `ms` [&lt;Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type)
@@ -229,14 +231,14 @@ Checks whether 'opensslCli' is supported.
229231
Platform normalizes timeout.
230232

231233
### PIPE
232-
* return [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
234+
* [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
233235

234-
Path to the test sock.
236+
Path to the test socket.
235237

236238
### PORT
237-
* return [&lt;Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) default = `12346`
239+
* [&lt;Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) default = `12346`
238240

239-
Port tests are running on.
241+
A port number for tests to use if one is needed.
240242

241243
### printSkipMessage(msg)
242244
* `msg` [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
@@ -249,7 +251,7 @@ Logs '1..0 # Skipped: ' + `msg`
249251
Deletes the 'tmp' dir and recreates it
250252

251253
### rootDir
252-
* return [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
254+
* [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
253255

254256
Path to the 'root' directory. either `/` or `c:\\` (windows)
255257

@@ -271,7 +273,7 @@ Platform normalizes the `pwd` command.
271273
Synchronous version of `spawnPwd`.
272274

273275
### tmpDir
274-
* return [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
276+
* [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
275277

276278
The realpath of the 'tmp' directory.
277279

0 commit comments

Comments
 (0)
Please sign in to comment.