From 48e90ed87e3116333f0b964a2eed352ca915a660 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Tue, 20 Feb 2018 01:42:14 +0200 Subject: [PATCH] doc: lowercase primitives in test/common/README.md PR-URL: https://github.com/nodejs/node/pull/18875 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Ruben Bridgewater Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca --- test/common/README.md | 156 +++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/test/common/README.md b/test/common/README.md index daf295855b8c76..01064a7a8b73f1 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -21,7 +21,7 @@ The `benchmark` module is used by tests to run benchmarks. ### runBenchmark(name, args, env) -* `name` [<String>] Name of benchmark suite to be run. +* `name` [<string>] Name of benchmark suite to be run. * `args` [<Array>] Array of environment variable key/value pairs (ex: `n=1`) to be applied via `--set`. * `env` [<Object>] Environment variables to be applied during the run. @@ -41,12 +41,12 @@ Takes `whitelist` and concats that with predefined `knownGlobals`. A stream to push an array into a REPL ### busyLoop(time) -* `time` [<Number>] +* `time` [<number>] Blocks for `time` amount of time. ### canCreateSymLink() -* return [<Boolean>] +* return [<boolean>] Checks whether the current running process can create symlinks. On Windows, this returns `false` if the process running doesn't have privileges to create @@ -67,7 +67,7 @@ failures. Platform normalizes the `dd` command ### enoughTestMem -* [<Boolean>] +* [<boolean>] Indicates if there is more than 1gb of total memory. @@ -76,17 +76,17 @@ Indicates if there is more than 1gb of total memory. * `settings` [<Object>] that must contain the `code` property plus any of the other following properties (some properties only apply for `AssertionError`): - * `code` [<String>] + * `code` [<string>] expected error must have this value for its `code` property. * `type` [<Function>] expected error must be an instance of `type` and must be an Error subclass. - * `message` [<String>] or [<RegExp>] + * `message` [<string>] or [<RegExp>] if a string is provided for `message`, expected error must have it for its `message` property; if a regular expression is provided for `message`, the regular expression must match the `message` property of the expected error. - * `name` [<String>] + * `name` [<string>] expected error must have this value for its `name` property. - * `generatedMessage` [<String>] + * `generatedMessage` [<string>] (`AssertionError` only) expected error must have this value for its `generatedMessage` property. * `actual` <any> @@ -98,7 +98,7 @@ Indicates if there is more than 1gb of total memory. * `operator` <any> (`AssertionError` only) expected error must have this value for its `operator` property. -* `exact` [<Number>] default = 1 +* `exact` [<number>] default = 1 * return [<Function>] If `fn` is provided, it will be passed to `assert.throws` as first argument @@ -109,14 +109,14 @@ Indicates if there is more than 1gb of total memory. test is complete, then the test will fail. ### expectWarning(name, expected) -* `name` [<String>] -* `expected` [<String>] | [<Array>] +* `name` [<string>] +* `expected` [<string>] | [<Array>] Tests whether `name` and `expected` are part of a raised warning. ### fileExists(pathname) -* pathname [<String>] -* return [<Boolean>] +* pathname [<string>] +* return [<boolean>] Checks if `pathname` exists @@ -135,42 +135,42 @@ consisting of all `ArrayBufferView` and an `ArrayBuffer`. ### getCallSite(func) * `func` [<Function>] -* return [<String>] +* return [<string>] Returns the file name and line number for the provided Function. ### globalCheck -* [<Boolean>] +* [<boolean>] Set to `false` if the test should not check for global leaks. ### hasCrypto -* [<Boolean>] +* [<boolean>] Indicates whether OpenSSL is available. ### hasFipsCrypto -* [<Boolean>] +* [<boolean>] Indicates `hasCrypto` and `crypto` with fips. ### hasIntl -* [<Boolean>] +* [<boolean>] Indicates if [internationalization] is supported. ### hasSmallICU -* [<Boolean>] +* [<boolean>] Indicates `hasIntl` and `small-icu` are supported. ### hasIPv6 -* [<Boolean>] +* [<boolean>] Indicates whether `IPv6` is supported on this platform. ### hasMultiLocalhost -* [<Boolean>] +* [<boolean>] Indicates if there are multiple localhosts available. @@ -193,58 +193,58 @@ be passed to `listener`. What's more, `process.stdout.writeTimes` is a count of the number of calls. ### inFreeBSDJail -* [<Boolean>] +* [<boolean>] Checks whether free BSD Jail is true or false. ### isAIX -* [<Boolean>] +* [<boolean>] Platform check for Advanced Interactive eXecutive (AIX). ### isAlive(pid) -* `pid` [<Number>] -* return [<Boolean>] +* `pid` [<number>] +* return [<boolean>] Attempts to 'kill' `pid` ### isFreeBSD -* [<Boolean>] +* [<boolean>] Platform check for Free BSD. ### isLinux -* [<Boolean>] +* [<boolean>] Platform check for Linux. ### isLinuxPPCBE -* [<Boolean>] +* [<boolean>] Platform check for Linux on PowerPC. ### isOSX -* [<Boolean>] +* [<boolean>] Platform check for macOS. ### isSunOS -* [<Boolean>] +* [<boolean>] Platform check for SunOS. ### isWindows -* [<Boolean>] +* [<boolean>] Platform check for Windows. ### isWOW64 -* [<Boolean>] +* [<boolean>] Platform check for Windows 32-bit on Windows 64-bit. ### isCPPSymbolsNotMapped -* [<Boolean>] +* [<boolean>] Platform check for C++ symbols are mapped or not. @@ -254,7 +254,7 @@ Platform check for C++ symbols are mapped or not. Indicates whether any globals are not on the `knownGlobals` list. ### localhostIPv4 -* [<String>] +* [<string>] IP of `localhost`. @@ -265,7 +265,7 @@ Array of IPV6 representations for `localhost`. ### mustCall([fn][, exact]) * `fn` [<Function>] default = () => {} -* `exact` [<Number>] default = 1 +* `exact` [<number>] default = 1 * return [<Function>] Returns a function that calls `fn`. If the returned function has not been called @@ -276,7 +276,7 @@ If `fn` is not provided, an empty function will be used. ### mustCallAsync([fn][, exact]) * `fn` [<Function>] -* `exact` [<Number>] default = 1 +* `exact` [<number>] default = 1 * return [<Function>] The same as `mustCall()`, except that it is also checked that the Promise @@ -287,7 +287,7 @@ function, if necessary wrapped as a promise. ### mustCallAtLeast([fn][, minimum]) * `fn` [<Function>] default = () => {} -* `minimum` [<Number>] default = 1 +* `minimum` [<number>] default = 1 * return [<Function>] Returns a function that calls `fn`. If the returned function has not been called @@ -297,44 +297,44 @@ fail. If `fn` is not provided, an empty function will be used. ### mustNotCall([msg]) -* `msg` [<String>] default = 'function should not have been called' +* `msg` [<string>] default = 'function should not have been called' * return [<Function>] Returns a function that triggers an `AssertionError` if it is invoked. `msg` is used as the error message for the `AssertionError`. ### nodeProcessAborted(exitCode, signal) -* `exitCode` [<Number>] -* `signal` [<String>] -* return [<Boolean>] +* `exitCode` [<number>] +* `signal` [<string>] +* return [<boolean>] 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. ### opensslCli -* [<Boolean>] +* [<boolean>] Indicates whether 'opensslCli' is supported. ### platformTimeout(ms) -* `ms` [<Number>] -* return [<Number>] +* `ms` [<number>] +* return [<number>] Platform normalizes timeout. ### PIPE -* [<String>] +* [<string>] Path to the test socket. ### PORT -* [<Number>] +* [<number>] A port number for tests to use if one is needed. ### printSkipMessage(msg) -* `msg` [<String>] +* `msg` [<string>] Logs '1..0 # Skipped: ' + `msg` @@ -349,12 +349,12 @@ Restore the original `process.stdout.write`. Used to restore `stdout` to its original state after calling [`common.hijackStdOut()`][]. ### rootDir -* [<String>] +* [<string>] Path to the 'root' directory. either `/` or `c:\\` (windows) ### skip(msg) -* `msg` [<String>] +* `msg` [<string>] Logs '1..0 # Skipped: ' + `msg` and exits with exit code `0`. @@ -427,8 +427,8 @@ The `DNS` module provides utilities related to the `dns` built-in module. ### errorLookupMock(code, syscall) -* `code` [<String>] Defaults to `dns.mockedErrorCode`. -* `syscall` [<String>] Defaults to `dns.mockedSysCall`. +* `code` [<string>] Defaults to `dns.mockedErrorCode`. +* `syscall` [<string>] Defaults to `dns.mockedSysCall`. * return [<Function>] A mock for the `lookup` option of `net.connect()` that would result in an error @@ -446,7 +446,7 @@ The default `syscall` of errors generated by `errorLookupMock`. ### readDomainFromPacket(buffer, offset) * `buffer` [<Buffer>] -* `offset` [<Number>] +* `offset` [<number>] * return [<Object>] Reads the domain string from a packet and returns an object containing the @@ -462,14 +462,14 @@ the packet depending on the type of packet. ### writeIPv6(ip) -* `ip` [<String>] +* `ip` [<string>] * return [<Buffer>] Reads an IPv6 String and returns a Buffer containing the parts. ### writeDomainName(domain) -* `domain` [<String>] +* `domain` [<string>] * return [<Buffer>] Reads a Domain String and returns a Buffer containing the domain. @@ -497,26 +497,26 @@ files in the `test/fixtures` directory. ### fixtures.fixturesDir -* [<String>] +* [<string>] The absolute path to the `test/fixtures/` directory. ### fixtures.path(...args) -* `...args` [<String>] +* `...args` [<string>] Returns the result of `path.join(fixtures.fixturesDir, ...args)`. ### fixtures.readSync(args[, enc]) -* `args` [<String>] | [<Array>] +* `args` [<string>] | [<Array>] Returns the result of `fs.readFileSync(path.join(fixtures.fixturesDir, ...args), 'enc')`. ### fixtures.readKey(arg[, enc]) -* `arg` [<String>] +* `arg` [<string>] Returns the result of `fs.readFileSync(path.join(fixtures.fixturesDir, 'keys', arg), 'enc')`. @@ -640,26 +640,26 @@ internet-related tests. ### internet.addresses * [<Object>] - * `INET_HOST` [<String>] A generic host that has registered common + * `INET_HOST` [<string>] A generic host that has registered common DNS records, supports both IPv4 and IPv6, and provides basic HTTP/HTTPS services - * `INET4_HOST` [<String>] A host that provides IPv4 services - * `INET6_HOST` [<String>] A host that provides IPv6 services - * `INET4_IP` [<String>] An accessible IPv4 IP, defaults to the + * `INET4_HOST` [<string>] A host that provides IPv4 services + * `INET6_HOST` [<string>] A host that provides IPv6 services + * `INET4_IP` [<string>] An accessible IPv4 IP, defaults to the Google Public DNS IPv4 address - * `INET6_IP` [<String>] An accessible IPv6 IP, defaults to the + * `INET6_IP` [<string>] An accessible IPv6 IP, defaults to the Google Public DNS IPv6 address - * `INVALID_HOST` [<String>] An invalid host that cannot be resolved - * `MX_HOST` [<String>] A host with MX records registered - * `SRV_HOST` [<String>] A host with SRV records registered - * `PTR_HOST` [<String>] A host with PTR records registered - * `NAPTR_HOST` [<String>] A host with NAPTR records registered - * `SOA_HOST` [<String>] A host with SOA records registered - * `CNAME_HOST` [<String>] A host with CNAME records registered - * `NS_HOST` [<String>] A host with NS records registered - * `TXT_HOST` [<String>] A host with TXT records registered - * `DNS4_SERVER` [<String>] An accessible IPv4 DNS server - * `DNS6_SERVER` [<String>] An accessible IPv6 DNS server + * `INVALID_HOST` [<string>] An invalid host that cannot be resolved + * `MX_HOST` [<string>] A host with MX records registered + * `SRV_HOST` [<string>] A host with SRV records registered + * `PTR_HOST` [<string>] A host with PTR records registered + * `NAPTR_HOST` [<string>] A host with NAPTR records registered + * `SOA_HOST` [<string>] A host with SOA records registered + * `CNAME_HOST` [<string>] A host with CNAME records registered + * `NS_HOST` [<string>] A host with NS records registered + * `TXT_HOST` [<string>] A host with TXT records registered + * `DNS4_SERVER` [<string>] An accessible IPv4 DNS server + * `DNS6_SERVER` [<string>] An accessible IPv6 DNS server A set of addresses for internet-related tests. All properties are configurable via `NODE_TEST_*` environment variables. For example, to configure @@ -671,7 +671,7 @@ variable `NODE_TEST_INET_HOST` to a specified host. The `tmpdir` module supports the use of a temporary directory for testing. ### path -* [<String>] +* [<string>] The realpath of the testing temporary directory. @@ -697,13 +697,13 @@ implementation with tests from [<Array>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array [<ArrayBufferView[]>]: https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView -[<Boolean>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type [<Buffer>]: https://nodejs.org/api/buffer.html#buffer_class_buffer [<Function>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function -[<Number>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type [<Object>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object [<RegExp>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp -[<String>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type +[<boolean>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type +[<number>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type +[<string>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type [`common.hijackStdErr()`]: #hijackstderrlistener [`common.hijackStdOut()`]: #hijackstdoutlistener [internationalization]: https://github.com/nodejs/node/wiki/Intl