cdk-ecr-deployment 2.5.29 → 2.5.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +1 -1
- package/.jsii +129 -27
- package/.jsii.tabl.json +1 -1
- package/.projenrc.ts +3 -1
- package/API.md +2 -0
- package/lambda/install.js +7 -6
- package/lib/index.d.ts +10 -0
- package/lib/index.js +6 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +0 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +4 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +48 -24
- package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +15 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +43 -35
- package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +267 -122
- package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +107 -89
- package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +17 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +12 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +755 -269
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +86 -45
- package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +28 -25
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +203 -62
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dom-events.d.ts +67 -71
- package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +127 -7
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +115 -73
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +560 -315
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +96 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +0 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +359 -195
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +629 -377
- package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +221 -112
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +0 -46
- package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +2 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +195 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +154 -93
- package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +9 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +88 -95
- package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +13 -13
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +19 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +166 -128
- package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +14 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +12 -7
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +69 -56
- package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +67 -61
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +56 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +40 -20
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +498 -218
- package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +398 -170
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +34 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +162 -71
- package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert.d.ts +48 -24
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/async_hooks.d.ts +15 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/buffer.d.ts +44 -36
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +267 -122
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/console.d.ts +17 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +755 -269
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dgram.d.ts +86 -45
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns/promises.d.ts +28 -25
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns.d.ts +203 -62
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/events.d.ts +79 -7
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs/promises.d.ts +117 -74
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs.d.ts +560 -315
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.d.ts +96 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +359 -195
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +629 -377
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +221 -112
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/index.d.ts +0 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/inspector.d.ts +2 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +195 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +154 -93
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/os.d.ts +9 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/path.d.ts +13 -13
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/process.d.ts +166 -128
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/punycode.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +1162 -853
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +398 -170
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers.d.ts +34 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +162 -71
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/url.d.ts +40 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +263 -129
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/vm.d.ts +52 -45
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/wasi.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -85
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +10 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +40 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +263 -129
- package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +52 -45
- package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +83 -85
- package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +9 -9
- package/node_modules/@types/http-cache-semantics/LICENSE +0 -0
- package/node_modules/@types/http-cache-semantics/README.md +1 -2
- package/node_modules/@types/http-cache-semantics/index.d.ts +1 -6
- package/node_modules/@types/http-cache-semantics/package.json +5 -5
- package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +0 -0
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +4 -5
- package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +48 -24
- package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +15 -6
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +43 -35
- package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +267 -122
- package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +107 -89
- package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +17 -14
- package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +12 -11
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +755 -269
- package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +86 -45
- package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +28 -25
- package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +203 -62
- package/node_modules/@types/keyv/node_modules/@types/node/dom-events.d.ts +67 -71
- package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +127 -7
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +115 -73
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +560 -315
- package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +96 -18
- package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +0 -0
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +359 -195
- package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +629 -377
- package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +221 -112
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +0 -46
- package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +2 -3
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +195 -14
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +154 -93
- package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +9 -9
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +88 -95
- package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +13 -13
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +19 -18
- package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +166 -128
- package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +14 -4
- package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +12 -7
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +69 -56
- package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +67 -61
- package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +56 -15
- package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +40 -20
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +498 -218
- package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +398 -170
- package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +34 -9
- package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +162 -71
- package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert.d.ts +48 -24
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/async_hooks.d.ts +15 -6
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/buffer.d.ts +44 -36
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +267 -122
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/console.d.ts +17 -14
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +755 -269
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dgram.d.ts +86 -45
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns/promises.d.ts +28 -25
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns.d.ts +203 -62
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/events.d.ts +79 -7
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs/promises.d.ts +117 -74
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs.d.ts +560 -315
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.d.ts +96 -18
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +359 -195
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +629 -377
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +221 -112
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/index.d.ts +0 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/inspector.d.ts +2 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +195 -14
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +154 -93
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/os.d.ts +9 -9
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/path.d.ts +13 -13
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/process.d.ts +166 -128
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/punycode.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +1162 -853
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +398 -170
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers.d.ts +34 -9
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +162 -71
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/url.d.ts +40 -14
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +263 -129
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/vm.d.ts +52 -45
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/wasi.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -85
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
- package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +10 -10
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +40 -14
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +263 -129
- package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +52 -45
- package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +83 -85
- package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +9 -9
- package/node_modules/@types/responselike/LICENSE +21 -21
- package/node_modules/@types/responselike/README.md +39 -7
- package/node_modules/@types/responselike/index.d.ts +3 -8
- package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +0 -0
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +4 -5
- package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +48 -24
- package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +15 -6
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +43 -35
- package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +267 -122
- package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +107 -89
- package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +17 -14
- package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +12 -11
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +755 -269
- package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +86 -45
- package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +28 -25
- package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +203 -62
- package/node_modules/@types/responselike/node_modules/@types/node/dom-events.d.ts +67 -71
- package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +127 -7
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +115 -73
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +560 -315
- package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +96 -18
- package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +0 -0
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +359 -195
- package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +629 -377
- package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +221 -112
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +0 -46
- package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +2 -3
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +195 -14
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +154 -93
- package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +9 -9
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +88 -95
- package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +13 -13
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +19 -18
- package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +166 -128
- package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +14 -4
- package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +12 -7
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +69 -56
- package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +67 -61
- package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +56 -15
- package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +40 -20
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +498 -218
- package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +398 -170
- package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +34 -9
- package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +162 -71
- package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert.d.ts +48 -24
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/async_hooks.d.ts +15 -6
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/buffer.d.ts +44 -36
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +267 -122
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/console.d.ts +17 -14
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +755 -269
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dgram.d.ts +86 -45
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns/promises.d.ts +28 -25
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns.d.ts +203 -62
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/events.d.ts +79 -7
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs/promises.d.ts +117 -74
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs.d.ts +560 -315
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.d.ts +96 -18
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +359 -195
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +629 -377
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +221 -112
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/index.d.ts +0 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/inspector.d.ts +2 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +195 -14
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +154 -93
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/os.d.ts +9 -9
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/path.d.ts +13 -13
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/process.d.ts +166 -128
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/punycode.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +1162 -853
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +398 -170
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers.d.ts +34 -9
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +162 -71
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/url.d.ts +40 -14
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +263 -129
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/vm.d.ts +52 -45
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/wasi.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -85
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
- package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +10 -10
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +40 -14
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +263 -129
- package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +52 -45
- package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +83 -85
- package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +9 -9
- package/node_modules/@types/responselike/package.json +9 -7
- package/node_modules/keyv/README.md +2 -0
- package/node_modules/keyv/package.json +13 -14
- package/node_modules/keyv/src/index.d.ts +6 -10
- package/node_modules/keyv/src/index.js +7 -12
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client.d.ts +97 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +28 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/node_modules/undici-types/errors.d.ts +128 -0
- package/node_modules/undici-types/fetch.d.ts +209 -0
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/handlers.d.ts +9 -0
- package/node_modules/undici-types/header.d.ts +4 -0
- package/node_modules/undici-types/index.d.ts +63 -0
- package/node_modules/undici-types/interceptors.d.ts +5 -0
- package/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +71 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +28 -0
- package/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/node_modules/undici-types/readable.d.ts +61 -0
- package/node_modules/undici-types/webidl.d.ts +220 -0
- package/node_modules/undici-types/websocket.d.ts +131 -0
- package/package.json +10 -11
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/buffer-stream.js +0 -0
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/index.d.ts +0 -0
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/index.js +0 -0
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/license +0 -0
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/package.json +0 -0
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/readme.md +0 -0
|
@@ -76,14 +76,17 @@
|
|
|
76
76
|
*
|
|
77
77
|
* If any tests fail, the process exit code is set to `1`.
|
|
78
78
|
* @since v18.0.0, v16.17.0
|
|
79
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
79
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.4.0/lib/test.js)
|
|
80
80
|
*/
|
|
81
|
-
declare module
|
|
82
|
-
import { Readable } from
|
|
81
|
+
declare module "node:test" {
|
|
82
|
+
import { Readable } from "node:stream";
|
|
83
|
+
import { AsyncResource } from "node:async_hooks";
|
|
83
84
|
/**
|
|
84
85
|
* ```js
|
|
85
86
|
* import { tap } from 'node:test/reporters';
|
|
87
|
+
* import { run } from 'node:test';
|
|
86
88
|
* import process from 'node:process';
|
|
89
|
+
* import path from 'node:path';
|
|
87
90
|
*
|
|
88
91
|
* run({ files: [path.resolve('./tests/test.js')] })
|
|
89
92
|
* .compose(tap)
|
|
@@ -136,20 +139,7 @@ declare module 'node:test' {
|
|
|
136
139
|
function test(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
137
140
|
function test(fn?: TestFn): Promise<void>;
|
|
138
141
|
namespace test {
|
|
139
|
-
export {
|
|
140
|
-
after,
|
|
141
|
-
afterEach,
|
|
142
|
-
before,
|
|
143
|
-
beforeEach,
|
|
144
|
-
describe,
|
|
145
|
-
it,
|
|
146
|
-
run,
|
|
147
|
-
mock,
|
|
148
|
-
test,
|
|
149
|
-
skip,
|
|
150
|
-
todo,
|
|
151
|
-
only
|
|
152
|
-
};
|
|
142
|
+
export { after, afterEach, before, beforeEach, describe, it, mock, only, run, skip, test, todo };
|
|
153
143
|
}
|
|
154
144
|
/**
|
|
155
145
|
* The `describe()` function imported from the `node:test` module. Each
|
|
@@ -159,35 +149,35 @@ declare module 'node:test' {
|
|
|
159
149
|
* @param [name='The name'] The name of the suite, which is displayed when reporting test results.
|
|
160
150
|
* @param options Configuration options for the suite. supports the same options as `test([name][, options][, fn])`.
|
|
161
151
|
* @param [fn='A no-op function'] The function under suite declaring all subtests and subsuites. The first argument to this function is a {@link SuiteContext} object.
|
|
162
|
-
* @return `undefined`.
|
|
152
|
+
* @return Immediately fulfilled with `undefined`.
|
|
163
153
|
*/
|
|
164
|
-
function describe(name?: string, options?: TestOptions, fn?: SuiteFn): void
|
|
165
|
-
function describe(name?: string, fn?: SuiteFn): void
|
|
166
|
-
function describe(options?: TestOptions, fn?: SuiteFn): void
|
|
167
|
-
function describe(fn?: SuiteFn): void
|
|
154
|
+
function describe(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
155
|
+
function describe(name?: string, fn?: SuiteFn): Promise<void>;
|
|
156
|
+
function describe(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
157
|
+
function describe(fn?: SuiteFn): Promise<void>;
|
|
168
158
|
namespace describe {
|
|
169
159
|
/**
|
|
170
160
|
* Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`.
|
|
171
161
|
*/
|
|
172
|
-
function skip(name?: string, options?: TestOptions, fn?: SuiteFn): void
|
|
173
|
-
function skip(name?: string, fn?: SuiteFn): void
|
|
174
|
-
function skip(options?: TestOptions, fn?: SuiteFn): void
|
|
175
|
-
function skip(fn?: SuiteFn): void
|
|
162
|
+
function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
163
|
+
function skip(name?: string, fn?: SuiteFn): Promise<void>;
|
|
164
|
+
function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
165
|
+
function skip(fn?: SuiteFn): Promise<void>;
|
|
176
166
|
/**
|
|
177
167
|
* Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.
|
|
178
168
|
*/
|
|
179
|
-
function todo(name?: string, options?: TestOptions, fn?: SuiteFn): void
|
|
180
|
-
function todo(name?: string, fn?: SuiteFn): void
|
|
181
|
-
function todo(options?: TestOptions, fn?: SuiteFn): void
|
|
182
|
-
function todo(fn?: SuiteFn): void
|
|
169
|
+
function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
170
|
+
function todo(name?: string, fn?: SuiteFn): Promise<void>;
|
|
171
|
+
function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
172
|
+
function todo(fn?: SuiteFn): Promise<void>;
|
|
183
173
|
/**
|
|
184
174
|
* Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
|
|
185
175
|
* @since v18.15.0
|
|
186
176
|
*/
|
|
187
|
-
function only(name?: string, options?: TestOptions, fn?: SuiteFn): void
|
|
188
|
-
function only(name?: string, fn?: SuiteFn): void
|
|
189
|
-
function only(options?: TestOptions, fn?: SuiteFn): void
|
|
190
|
-
function only(fn?: SuiteFn): void
|
|
177
|
+
function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
178
|
+
function only(name?: string, fn?: SuiteFn): Promise<void>;
|
|
179
|
+
function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
180
|
+
function only(fn?: SuiteFn): Promise<void>;
|
|
191
181
|
}
|
|
192
182
|
/**
|
|
193
183
|
* Shorthand for `test()`.
|
|
@@ -195,69 +185,78 @@ declare module 'node:test' {
|
|
|
195
185
|
* The `it()` function is imported from the `node:test` module.
|
|
196
186
|
* @since v18.6.0, v16.17.0
|
|
197
187
|
*/
|
|
198
|
-
function it(name?: string, options?: TestOptions, fn?: TestFn): void
|
|
199
|
-
function it(name?: string, fn?: TestFn): void
|
|
200
|
-
function it(options?: TestOptions, fn?: TestFn): void
|
|
201
|
-
function it(fn?: TestFn): void
|
|
188
|
+
function it(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
189
|
+
function it(name?: string, fn?: TestFn): Promise<void>;
|
|
190
|
+
function it(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
191
|
+
function it(fn?: TestFn): Promise<void>;
|
|
202
192
|
namespace it {
|
|
203
193
|
/**
|
|
204
194
|
* Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
|
|
205
195
|
*/
|
|
206
|
-
function skip(name?: string, options?: TestOptions, fn?: TestFn): void
|
|
207
|
-
function skip(name?: string, fn?: TestFn): void
|
|
208
|
-
function skip(options?: TestOptions, fn?: TestFn): void
|
|
209
|
-
function skip(fn?: TestFn): void
|
|
196
|
+
function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
197
|
+
function skip(name?: string, fn?: TestFn): Promise<void>;
|
|
198
|
+
function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
199
|
+
function skip(fn?: TestFn): Promise<void>;
|
|
210
200
|
/**
|
|
211
201
|
* Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
|
|
212
202
|
*/
|
|
213
|
-
function todo(name?: string, options?: TestOptions, fn?: TestFn): void
|
|
214
|
-
function todo(name?: string, fn?: TestFn): void
|
|
215
|
-
function todo(options?: TestOptions, fn?: TestFn): void
|
|
216
|
-
function todo(fn?: TestFn): void
|
|
203
|
+
function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
204
|
+
function todo(name?: string, fn?: TestFn): Promise<void>;
|
|
205
|
+
function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
206
|
+
function todo(fn?: TestFn): Promise<void>;
|
|
217
207
|
/**
|
|
218
208
|
* Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
|
|
219
209
|
* @since v18.15.0
|
|
220
210
|
*/
|
|
221
|
-
function only(name?: string, options?: TestOptions, fn?: TestFn): void
|
|
222
|
-
function only(name?: string, fn?: TestFn): void
|
|
223
|
-
function only(options?: TestOptions, fn?: TestFn): void
|
|
224
|
-
function only(fn?: TestFn): void
|
|
211
|
+
function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
212
|
+
function only(name?: string, fn?: TestFn): Promise<void>;
|
|
213
|
+
function only(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
214
|
+
function only(fn?: TestFn): Promise<void>;
|
|
225
215
|
}
|
|
226
216
|
/**
|
|
227
217
|
* Shorthand for skipping a test, same as `test([name], { skip: true }[, fn])`.
|
|
228
218
|
* @since v20.2.0
|
|
229
219
|
*/
|
|
230
|
-
function skip(name?: string, options?: TestOptions, fn?: TestFn): void
|
|
231
|
-
function skip(name?: string, fn?: TestFn): void
|
|
232
|
-
function skip(options?: TestOptions, fn?: TestFn): void
|
|
233
|
-
function skip(fn?: TestFn): void
|
|
220
|
+
function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
221
|
+
function skip(name?: string, fn?: TestFn): Promise<void>;
|
|
222
|
+
function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
223
|
+
function skip(fn?: TestFn): Promise<void>;
|
|
234
224
|
/**
|
|
235
225
|
* Shorthand for marking a test as `TODO`, same as `test([name], { todo: true }[, fn])`.
|
|
236
226
|
* @since v20.2.0
|
|
237
227
|
*/
|
|
238
|
-
function todo(name?: string, options?: TestOptions, fn?: TestFn): void
|
|
239
|
-
function todo(name?: string, fn?: TestFn): void
|
|
240
|
-
function todo(options?: TestOptions, fn?: TestFn): void
|
|
241
|
-
function todo(fn?: TestFn): void
|
|
228
|
+
function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
229
|
+
function todo(name?: string, fn?: TestFn): Promise<void>;
|
|
230
|
+
function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
231
|
+
function todo(fn?: TestFn): Promise<void>;
|
|
242
232
|
/**
|
|
243
233
|
* Shorthand for marking a test as `only`, same as `test([name], { only: true }[, fn])`.
|
|
244
234
|
* @since v20.2.0
|
|
245
235
|
*/
|
|
246
|
-
function only(name?: string, options?: TestOptions, fn?: TestFn): void
|
|
247
|
-
function only(name?: string, fn?: TestFn): void
|
|
248
|
-
function only(options?: TestOptions, fn?: TestFn): void
|
|
249
|
-
function only(fn?: TestFn): void
|
|
236
|
+
function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
237
|
+
function only(name?: string, fn?: TestFn): Promise<void>;
|
|
238
|
+
function only(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
239
|
+
function only(fn?: TestFn): Promise<void>;
|
|
250
240
|
/**
|
|
251
241
|
* The type of a function under test. The first argument to this function is a
|
|
252
242
|
* {@link TestContext} object. If the test uses callbacks, the callback function is passed as
|
|
253
243
|
* the second argument.
|
|
254
244
|
*/
|
|
255
|
-
type TestFn = (t: TestContext, done: (result?: any) => void) =>
|
|
245
|
+
type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise<void>;
|
|
256
246
|
/**
|
|
257
247
|
* The type of a function under Suite.
|
|
258
|
-
* If the test uses callbacks, the callback function is passed as an argument
|
|
259
248
|
*/
|
|
260
|
-
type SuiteFn = (
|
|
249
|
+
type SuiteFn = (s: SuiteContext) => void | Promise<void>;
|
|
250
|
+
interface TestShard {
|
|
251
|
+
/**
|
|
252
|
+
* A positive integer between 1 and `<total>` that specifies the index of the shard to run.
|
|
253
|
+
*/
|
|
254
|
+
index: number;
|
|
255
|
+
/**
|
|
256
|
+
* A positive integer that specifies the total number of shards to split the test files to.
|
|
257
|
+
*/
|
|
258
|
+
total: number;
|
|
259
|
+
}
|
|
261
260
|
interface RunOptions {
|
|
262
261
|
/**
|
|
263
262
|
* If a number is provided, then that many files would run in parallel.
|
|
@@ -295,6 +294,33 @@ declare module 'node:test' {
|
|
|
295
294
|
* For each test that is executed, any corresponding test hooks, such as `beforeEach()`, are also run.
|
|
296
295
|
*/
|
|
297
296
|
testNamePatterns?: string | RegExp | string[] | RegExp[];
|
|
297
|
+
/**
|
|
298
|
+
* If truthy, the test context will only run tests that have the `only` option set
|
|
299
|
+
*/
|
|
300
|
+
only?: boolean;
|
|
301
|
+
/**
|
|
302
|
+
* A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.
|
|
303
|
+
*/
|
|
304
|
+
setup?: (root: Test) => void | Promise<void>;
|
|
305
|
+
/**
|
|
306
|
+
* Whether to run in watch mode or not.
|
|
307
|
+
* @default false
|
|
308
|
+
*/
|
|
309
|
+
watch?: boolean | undefined;
|
|
310
|
+
/**
|
|
311
|
+
* Running tests in a specific shard.
|
|
312
|
+
* @default undefined
|
|
313
|
+
*/
|
|
314
|
+
shard?: TestShard | undefined;
|
|
315
|
+
}
|
|
316
|
+
class Test extends AsyncResource {
|
|
317
|
+
concurrency: number;
|
|
318
|
+
nesting: number;
|
|
319
|
+
only: boolean;
|
|
320
|
+
reporter: TestsStream;
|
|
321
|
+
runOnlySubtests: boolean;
|
|
322
|
+
testNumber: number;
|
|
323
|
+
timeout: number | null;
|
|
298
324
|
}
|
|
299
325
|
/**
|
|
300
326
|
* A successful call to `run()` method will return a new `TestsStream` object, streaming a series of events representing the execution of the tests.`TestsStream` will emit events, in the
|
|
@@ -302,53 +328,53 @@ declare module 'node:test' {
|
|
|
302
328
|
* @since v18.9.0, v16.19.0
|
|
303
329
|
*/
|
|
304
330
|
class TestsStream extends Readable implements NodeJS.ReadableStream {
|
|
305
|
-
addListener(event:
|
|
306
|
-
addListener(event:
|
|
307
|
-
addListener(event:
|
|
308
|
-
addListener(event:
|
|
309
|
-
addListener(event:
|
|
310
|
-
addListener(event:
|
|
311
|
-
addListener(event:
|
|
331
|
+
addListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
|
|
332
|
+
addListener(event: "test:fail", listener: (data: TestFail) => void): this;
|
|
333
|
+
addListener(event: "test:pass", listener: (data: TestPass) => void): this;
|
|
334
|
+
addListener(event: "test:plan", listener: (data: TestPlan) => void): this;
|
|
335
|
+
addListener(event: "test:start", listener: (data: TestStart) => void): this;
|
|
336
|
+
addListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
|
|
337
|
+
addListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
|
|
312
338
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
313
|
-
emit(event:
|
|
314
|
-
emit(event:
|
|
315
|
-
emit(event:
|
|
316
|
-
emit(event:
|
|
317
|
-
emit(event:
|
|
318
|
-
emit(event:
|
|
319
|
-
emit(event:
|
|
339
|
+
emit(event: "test:diagnostic", data: DiagnosticData): boolean;
|
|
340
|
+
emit(event: "test:fail", data: TestFail): boolean;
|
|
341
|
+
emit(event: "test:pass", data: TestPass): boolean;
|
|
342
|
+
emit(event: "test:plan", data: TestPlan): boolean;
|
|
343
|
+
emit(event: "test:start", data: TestStart): boolean;
|
|
344
|
+
emit(event: "test:stderr", data: TestStderr): boolean;
|
|
345
|
+
emit(event: "test:stdout", data: TestStdout): boolean;
|
|
320
346
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
321
|
-
on(event:
|
|
322
|
-
on(event:
|
|
323
|
-
on(event:
|
|
324
|
-
on(event:
|
|
325
|
-
on(event:
|
|
326
|
-
on(event:
|
|
327
|
-
on(event:
|
|
347
|
+
on(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
|
|
348
|
+
on(event: "test:fail", listener: (data: TestFail) => void): this;
|
|
349
|
+
on(event: "test:pass", listener: (data: TestPass) => void): this;
|
|
350
|
+
on(event: "test:plan", listener: (data: TestPlan) => void): this;
|
|
351
|
+
on(event: "test:start", listener: (data: TestStart) => void): this;
|
|
352
|
+
on(event: "test:stderr", listener: (data: TestStderr) => void): this;
|
|
353
|
+
on(event: "test:stdout", listener: (data: TestStdout) => void): this;
|
|
328
354
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
329
|
-
once(event:
|
|
330
|
-
once(event:
|
|
331
|
-
once(event:
|
|
332
|
-
once(event:
|
|
333
|
-
once(event:
|
|
334
|
-
once(event:
|
|
335
|
-
once(event:
|
|
355
|
+
once(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
|
|
356
|
+
once(event: "test:fail", listener: (data: TestFail) => void): this;
|
|
357
|
+
once(event: "test:pass", listener: (data: TestPass) => void): this;
|
|
358
|
+
once(event: "test:plan", listener: (data: TestPlan) => void): this;
|
|
359
|
+
once(event: "test:start", listener: (data: TestStart) => void): this;
|
|
360
|
+
once(event: "test:stderr", listener: (data: TestStderr) => void): this;
|
|
361
|
+
once(event: "test:stdout", listener: (data: TestStdout) => void): this;
|
|
336
362
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
337
|
-
prependListener(event:
|
|
338
|
-
prependListener(event:
|
|
339
|
-
prependListener(event:
|
|
340
|
-
prependListener(event:
|
|
341
|
-
prependListener(event:
|
|
342
|
-
prependListener(event:
|
|
343
|
-
prependListener(event:
|
|
363
|
+
prependListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
|
|
364
|
+
prependListener(event: "test:fail", listener: (data: TestFail) => void): this;
|
|
365
|
+
prependListener(event: "test:pass", listener: (data: TestPass) => void): this;
|
|
366
|
+
prependListener(event: "test:plan", listener: (data: TestPlan) => void): this;
|
|
367
|
+
prependListener(event: "test:start", listener: (data: TestStart) => void): this;
|
|
368
|
+
prependListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
|
|
369
|
+
prependListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
|
|
344
370
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
345
|
-
prependOnceListener(event:
|
|
346
|
-
prependOnceListener(event:
|
|
347
|
-
prependOnceListener(event:
|
|
348
|
-
prependOnceListener(event:
|
|
349
|
-
prependOnceListener(event:
|
|
350
|
-
prependOnceListener(event:
|
|
351
|
-
prependOnceListener(event:
|
|
371
|
+
prependOnceListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
|
|
372
|
+
prependOnceListener(event: "test:fail", listener: (data: TestFail) => void): this;
|
|
373
|
+
prependOnceListener(event: "test:pass", listener: (data: TestPass) => void): this;
|
|
374
|
+
prependOnceListener(event: "test:plan", listener: (data: TestPlan) => void): this;
|
|
375
|
+
prependOnceListener(event: "test:start", listener: (data: TestStart) => void): this;
|
|
376
|
+
prependOnceListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
|
|
377
|
+
prependOnceListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
|
|
352
378
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
353
379
|
}
|
|
354
380
|
/**
|
|
@@ -486,6 +512,24 @@ declare module 'node:test' {
|
|
|
486
512
|
*/
|
|
487
513
|
readonly mock: MockTracker;
|
|
488
514
|
}
|
|
515
|
+
/**
|
|
516
|
+
* An instance of `SuiteContext` is passed to each suite function in order to
|
|
517
|
+
* interact with the test runner. However, the `SuiteContext` constructor is not
|
|
518
|
+
* exposed as part of the API.
|
|
519
|
+
* @since v18.7.0, v16.17.0
|
|
520
|
+
*/
|
|
521
|
+
class SuiteContext {
|
|
522
|
+
/**
|
|
523
|
+
* The name of the suite.
|
|
524
|
+
* @since v18.8.0, v16.18.0
|
|
525
|
+
*/
|
|
526
|
+
readonly name: string;
|
|
527
|
+
/**
|
|
528
|
+
* Can be used to abort test subtasks when the test has been aborted.
|
|
529
|
+
* @since v18.7.0, v16.17.0
|
|
530
|
+
*/
|
|
531
|
+
readonly signal: AbortSignal;
|
|
532
|
+
}
|
|
489
533
|
interface TestOptions {
|
|
490
534
|
/**
|
|
491
535
|
* If a number is provided, then that many tests would run in parallel.
|
|
@@ -597,7 +641,7 @@ declare module 'node:test' {
|
|
|
597
641
|
* The hook function. If the hook uses callbacks, the callback function is passed as the
|
|
598
642
|
* second argument.
|
|
599
643
|
*/
|
|
600
|
-
type HookFn = (done: (result?: any) => void) => any;
|
|
644
|
+
type HookFn = (s: SuiteContext, done: (result?: any) => void) => any;
|
|
601
645
|
/**
|
|
602
646
|
* Configuration options for hooks.
|
|
603
647
|
* @since v18.8.0
|
|
@@ -688,7 +732,11 @@ declare module 'node:test' {
|
|
|
688
732
|
* behavior of the mocked function.
|
|
689
733
|
*/
|
|
690
734
|
fn<F extends Function = NoOpFunction>(original?: F, options?: MockFunctionOptions): Mock<F>;
|
|
691
|
-
fn<F extends Function = NoOpFunction, Implementation extends Function = F>(
|
|
735
|
+
fn<F extends Function = NoOpFunction, Implementation extends Function = F>(
|
|
736
|
+
original?: F,
|
|
737
|
+
implementation?: Implementation,
|
|
738
|
+
options?: MockFunctionOptions,
|
|
739
|
+
): Mock<F | Implementation>;
|
|
692
740
|
/**
|
|
693
741
|
* This function is used to create a mock on an existing object method. The
|
|
694
742
|
* following example demonstrates how a mock is created on an existing object
|
|
@@ -732,8 +780,7 @@ declare module 'node:test' {
|
|
|
732
780
|
object: MockedObject,
|
|
733
781
|
methodName: MethodName,
|
|
734
782
|
options?: MockFunctionOptions,
|
|
735
|
-
): MockedObject[MethodName] extends Function
|
|
736
|
-
? Mock<MockedObject[MethodName]>
|
|
783
|
+
): MockedObject[MethodName] extends Function ? Mock<MockedObject[MethodName]>
|
|
737
784
|
: never;
|
|
738
785
|
method<
|
|
739
786
|
MockedObject extends object,
|
|
@@ -744,8 +791,7 @@ declare module 'node:test' {
|
|
|
744
791
|
methodName: MethodName,
|
|
745
792
|
implementation: Implementation,
|
|
746
793
|
options?: MockFunctionOptions,
|
|
747
|
-
): MockedObject[MethodName] extends Function
|
|
748
|
-
? Mock<MockedObject[MethodName] | Implementation>
|
|
794
|
+
): MockedObject[MethodName] extends Function ? Mock<MockedObject[MethodName] | Implementation>
|
|
749
795
|
: never;
|
|
750
796
|
method<MockedObject extends object>(
|
|
751
797
|
object: MockedObject,
|
|
@@ -821,20 +867,17 @@ declare module 'node:test' {
|
|
|
821
867
|
* @since v19.1.0, v18.13.0
|
|
822
868
|
*/
|
|
823
869
|
restoreAll(): void;
|
|
870
|
+
timers: MockTimers;
|
|
824
871
|
}
|
|
825
872
|
const mock: MockTracker;
|
|
826
873
|
interface MockFunctionCall<
|
|
827
874
|
F extends Function,
|
|
828
|
-
ReturnType = F extends (...args: any) => infer T
|
|
829
|
-
? T
|
|
830
|
-
:
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
? Y
|
|
835
|
-
: F extends abstract new (...args: infer Y) => any
|
|
836
|
-
? Y
|
|
837
|
-
: unknown[],
|
|
875
|
+
ReturnType = F extends (...args: any) => infer T ? T
|
|
876
|
+
: F extends abstract new(...args: any) => infer T ? T
|
|
877
|
+
: unknown,
|
|
878
|
+
Args = F extends (...args: infer Y) => any ? Y
|
|
879
|
+
: F extends abstract new(...args: infer Y) => any ? Y
|
|
880
|
+
: unknown[],
|
|
838
881
|
> {
|
|
839
882
|
/**
|
|
840
883
|
* An array of the arguments passed to the mock function.
|
|
@@ -858,7 +901,7 @@ declare module 'node:test' {
|
|
|
858
901
|
* If the mocked function is a constructor, this field contains the class being constructed.
|
|
859
902
|
* Otherwise this will be `undefined`.
|
|
860
903
|
*/
|
|
861
|
-
target: F extends abstract new
|
|
904
|
+
target: F extends abstract new(...args: any) => any ? F : undefined;
|
|
862
905
|
/**
|
|
863
906
|
* The mocked function's `this` value.
|
|
864
907
|
*/
|
|
@@ -964,10 +1007,186 @@ declare module 'node:test' {
|
|
|
964
1007
|
*/
|
|
965
1008
|
restore(): void;
|
|
966
1009
|
}
|
|
967
|
-
|
|
1010
|
+
type Timer = "setInterval" | "clearInterval" | "setTimeout" | "clearTimeout";
|
|
1011
|
+
/**
|
|
1012
|
+
* Mocking timers is a technique commonly used in software testing to simulate and
|
|
1013
|
+
* control the behavior of timers, such as `setInterval` and `setTimeout`,
|
|
1014
|
+
* without actually waiting for the specified time intervals.
|
|
1015
|
+
*
|
|
1016
|
+
* The `MockTracker` provides a top-level `timers` export
|
|
1017
|
+
* which is a `MockTimers` instance.
|
|
1018
|
+
* @since v20.4.0
|
|
1019
|
+
* @experimental
|
|
1020
|
+
*/
|
|
1021
|
+
class MockTimers {
|
|
1022
|
+
/**
|
|
1023
|
+
* Enables timer mocking for the specified timers.
|
|
1024
|
+
*
|
|
1025
|
+
* **Note:** When you enable mocking for a specific timer, its associated
|
|
1026
|
+
* clear function will also be implicitly mocked.
|
|
1027
|
+
*
|
|
1028
|
+
* Example usage:
|
|
1029
|
+
*
|
|
1030
|
+
* ```js
|
|
1031
|
+
* import { mock } from 'node:test';
|
|
1032
|
+
* mock.timers.enable(['setInterval']);
|
|
1033
|
+
* ```
|
|
1034
|
+
*
|
|
1035
|
+
* The above example enables mocking for the `setInterval` timer and
|
|
1036
|
+
* implicitly mocks the `clearInterval` function. Only the `setInterval`and `clearInterval` functions from `node:timers`,`node:timers/promises`, and`globalThis` will be mocked.
|
|
1037
|
+
*
|
|
1038
|
+
* Alternatively, if you call `mock.timers.enable()` without any parameters:
|
|
1039
|
+
*
|
|
1040
|
+
* All timers (`'setInterval'`, `'clearInterval'`, `'setTimeout'`, and `'clearTimeout'`)
|
|
1041
|
+
* will be mocked. The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout`functions from `node:timers`, `node:timers/promises`,
|
|
1042
|
+
* and `globalThis` will be mocked.
|
|
1043
|
+
* @since v20.4.0
|
|
1044
|
+
*/
|
|
1045
|
+
enable(timers?: Timer[]): void;
|
|
1046
|
+
/**
|
|
1047
|
+
* This function restores the default behavior of all mocks that were previously
|
|
1048
|
+
* created by this `MockTimers` instance and disassociates the mocks
|
|
1049
|
+
* from the `MockTracker` instance.
|
|
1050
|
+
*
|
|
1051
|
+
* **Note:** After each test completes, this function is called on
|
|
1052
|
+
* the test context's `MockTracker`.
|
|
1053
|
+
*
|
|
1054
|
+
* ```js
|
|
1055
|
+
* import { mock } from 'node:test';
|
|
1056
|
+
* mock.timers.reset();
|
|
1057
|
+
* ```
|
|
1058
|
+
* @since v20.4.0
|
|
1059
|
+
*/
|
|
1060
|
+
reset(): void;
|
|
1061
|
+
/**
|
|
1062
|
+
* Advances time for all mocked timers.
|
|
1063
|
+
*
|
|
1064
|
+
* **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts
|
|
1065
|
+
* only positive numbers. In Node.js, `setTimeout` with negative numbers is
|
|
1066
|
+
* only supported for web compatibility reasons.
|
|
1067
|
+
*
|
|
1068
|
+
* The following example mocks a `setTimeout` function and
|
|
1069
|
+
* by using `.tick` advances in
|
|
1070
|
+
* time triggering all pending timers.
|
|
1071
|
+
*
|
|
1072
|
+
* ```js
|
|
1073
|
+
* import assert from 'node:assert';
|
|
1074
|
+
* import { test } from 'node:test';
|
|
1075
|
+
*
|
|
1076
|
+
* test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
|
|
1077
|
+
* const fn = context.mock.fn();
|
|
1078
|
+
*
|
|
1079
|
+
* context.mock.timers.enable(['setTimeout']);
|
|
1080
|
+
*
|
|
1081
|
+
* setTimeout(fn, 9999);
|
|
1082
|
+
*
|
|
1083
|
+
* assert.strictEqual(fn.mock.callCount(), 0);
|
|
1084
|
+
*
|
|
1085
|
+
* // Advance in time
|
|
1086
|
+
* context.mock.timers.tick(9999);
|
|
1087
|
+
*
|
|
1088
|
+
* assert.strictEqual(fn.mock.callCount(), 1);
|
|
1089
|
+
* });
|
|
1090
|
+
* ```
|
|
1091
|
+
*
|
|
1092
|
+
* Alternativelly, the `.tick` function can be called many times
|
|
1093
|
+
*
|
|
1094
|
+
* ```js
|
|
1095
|
+
* import assert from 'node:assert';
|
|
1096
|
+
* import { test } from 'node:test';
|
|
1097
|
+
*
|
|
1098
|
+
* test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
|
|
1099
|
+
* const fn = context.mock.fn();
|
|
1100
|
+
* context.mock.timers.enable(['setTimeout']);
|
|
1101
|
+
* const nineSecs = 9000;
|
|
1102
|
+
* setTimeout(fn, nineSecs);
|
|
1103
|
+
*
|
|
1104
|
+
* const twoSeconds = 3000;
|
|
1105
|
+
* context.mock.timers.tick(twoSeconds);
|
|
1106
|
+
* context.mock.timers.tick(twoSeconds);
|
|
1107
|
+
* context.mock.timers.tick(twoSeconds);
|
|
1108
|
+
*
|
|
1109
|
+
* assert.strictEqual(fn.mock.callCount(), 1);
|
|
1110
|
+
* });
|
|
1111
|
+
* ```
|
|
1112
|
+
* @since v20.4.0
|
|
1113
|
+
*/
|
|
1114
|
+
tick(milliseconds: number): void;
|
|
1115
|
+
/**
|
|
1116
|
+
* Triggers all pending mocked timers immediately.
|
|
1117
|
+
*
|
|
1118
|
+
* The example below triggers all pending timers immediately,
|
|
1119
|
+
* causing them to execute without any delay.
|
|
1120
|
+
*
|
|
1121
|
+
* ```js
|
|
1122
|
+
* import assert from 'node:assert';
|
|
1123
|
+
* import { test } from 'node:test';
|
|
1124
|
+
*
|
|
1125
|
+
* test('runAll functions following the given order', (context) => {
|
|
1126
|
+
* context.mock.timers.enable(['setTimeout']);
|
|
1127
|
+
* const results = [];
|
|
1128
|
+
* setTimeout(() => results.push(1), 9999);
|
|
1129
|
+
*
|
|
1130
|
+
* // Notice that if both timers have the same timeout,
|
|
1131
|
+
* // the order of execution is guaranteed
|
|
1132
|
+
* setTimeout(() => results.push(3), 8888);
|
|
1133
|
+
* setTimeout(() => results.push(2), 8888);
|
|
1134
|
+
*
|
|
1135
|
+
* assert.deepStrictEqual(results, []);
|
|
1136
|
+
*
|
|
1137
|
+
* context.mock.timers.runAll();
|
|
1138
|
+
*
|
|
1139
|
+
* assert.deepStrictEqual(results, [3, 2, 1]);
|
|
1140
|
+
* });
|
|
1141
|
+
* ```
|
|
1142
|
+
*
|
|
1143
|
+
* **Note:** The `runAll()` function is specifically designed for
|
|
1144
|
+
* triggering timers in the context of timer mocking.
|
|
1145
|
+
* It does not have any effect on real-time system
|
|
1146
|
+
* clocks or actual timers outside of the mocking environment.
|
|
1147
|
+
* @since v20.4.0
|
|
1148
|
+
*/
|
|
1149
|
+
runAll(): void;
|
|
1150
|
+
/**
|
|
1151
|
+
* Calls {@link MockTimers.reset()}.
|
|
1152
|
+
*/
|
|
1153
|
+
[Symbol.dispose](): void;
|
|
1154
|
+
}
|
|
1155
|
+
export {
|
|
1156
|
+
after,
|
|
1157
|
+
afterEach,
|
|
1158
|
+
before,
|
|
1159
|
+
beforeEach,
|
|
1160
|
+
describe,
|
|
1161
|
+
it,
|
|
1162
|
+
Mock,
|
|
1163
|
+
mock,
|
|
1164
|
+
only,
|
|
1165
|
+
run,
|
|
1166
|
+
skip,
|
|
1167
|
+
test,
|
|
1168
|
+
test as default,
|
|
1169
|
+
todo,
|
|
1170
|
+
};
|
|
968
1171
|
}
|
|
969
1172
|
|
|
970
|
-
interface
|
|
1173
|
+
interface TestLocationInfo {
|
|
1174
|
+
/**
|
|
1175
|
+
* The column number where the test is defined, or
|
|
1176
|
+
* `undefined` if the test was run through the REPL.
|
|
1177
|
+
*/
|
|
1178
|
+
column?: number;
|
|
1179
|
+
/**
|
|
1180
|
+
* The path of the test file, `undefined` if test is not ran through a file.
|
|
1181
|
+
*/
|
|
1182
|
+
file?: string;
|
|
1183
|
+
/**
|
|
1184
|
+
* The line number where the test is defined, or
|
|
1185
|
+
* `undefined` if the test was run through the REPL.
|
|
1186
|
+
*/
|
|
1187
|
+
line?: number;
|
|
1188
|
+
}
|
|
1189
|
+
interface DiagnosticData extends TestLocationInfo {
|
|
971
1190
|
/**
|
|
972
1191
|
* The diagnostic message.
|
|
973
1192
|
*/
|
|
@@ -976,12 +1195,8 @@ interface DiagnosticData {
|
|
|
976
1195
|
* The nesting level of the test.
|
|
977
1196
|
*/
|
|
978
1197
|
nesting: number;
|
|
979
|
-
/**
|
|
980
|
-
* The path of the test file, undefined if test is not ran through a file.
|
|
981
|
-
*/
|
|
982
|
-
file?: string;
|
|
983
1198
|
}
|
|
984
|
-
interface TestFail {
|
|
1199
|
+
interface TestFail extends TestLocationInfo {
|
|
985
1200
|
/**
|
|
986
1201
|
* Additional execution metadata.
|
|
987
1202
|
*/
|
|
@@ -989,11 +1204,16 @@ interface TestFail {
|
|
|
989
1204
|
/**
|
|
990
1205
|
* The duration of the test in milliseconds.
|
|
991
1206
|
*/
|
|
992
|
-
|
|
1207
|
+
duration_ms: number;
|
|
993
1208
|
/**
|
|
994
1209
|
* The error thrown by the test.
|
|
995
1210
|
*/
|
|
996
1211
|
error: Error;
|
|
1212
|
+
/**
|
|
1213
|
+
* The type of the test, used to denote whether this is a suite.
|
|
1214
|
+
* @since 20.0.0, 19.9.0, 18.17.0
|
|
1215
|
+
*/
|
|
1216
|
+
type?: "suite";
|
|
997
1217
|
};
|
|
998
1218
|
/**
|
|
999
1219
|
* The test name.
|
|
@@ -1015,12 +1235,8 @@ interface TestFail {
|
|
|
1015
1235
|
* Present if `context.skip` is called.
|
|
1016
1236
|
*/
|
|
1017
1237
|
skip?: string | boolean;
|
|
1018
|
-
/**
|
|
1019
|
-
* The path of the test file, undefined if test is not ran through a file.
|
|
1020
|
-
*/
|
|
1021
|
-
file?: string;
|
|
1022
1238
|
}
|
|
1023
|
-
interface TestPass {
|
|
1239
|
+
interface TestPass extends TestLocationInfo {
|
|
1024
1240
|
/**
|
|
1025
1241
|
* Additional execution metadata.
|
|
1026
1242
|
*/
|
|
@@ -1028,7 +1244,12 @@ interface TestPass {
|
|
|
1028
1244
|
/**
|
|
1029
1245
|
* The duration of the test in milliseconds.
|
|
1030
1246
|
*/
|
|
1031
|
-
|
|
1247
|
+
duration_ms: number;
|
|
1248
|
+
/**
|
|
1249
|
+
* The type of the test, used to denote whether this is a suite.
|
|
1250
|
+
* @since 20.0.0, 19.9.0, 18.17.0
|
|
1251
|
+
*/
|
|
1252
|
+
type?: "suite";
|
|
1032
1253
|
};
|
|
1033
1254
|
/**
|
|
1034
1255
|
* The test name.
|
|
@@ -1050,12 +1271,8 @@ interface TestPass {
|
|
|
1050
1271
|
* Present if `context.skip` is called.
|
|
1051
1272
|
*/
|
|
1052
1273
|
skip?: string | boolean;
|
|
1053
|
-
/**
|
|
1054
|
-
* The path of the test file, undefined if test is not ran through a file.
|
|
1055
|
-
*/
|
|
1056
|
-
file?: string;
|
|
1057
1274
|
}
|
|
1058
|
-
interface TestPlan {
|
|
1275
|
+
interface TestPlan extends TestLocationInfo {
|
|
1059
1276
|
/**
|
|
1060
1277
|
* The nesting level of the test.
|
|
1061
1278
|
*/
|
|
@@ -1064,12 +1281,8 @@ interface TestPlan {
|
|
|
1064
1281
|
* The number of subtests that have ran.
|
|
1065
1282
|
*/
|
|
1066
1283
|
count: number;
|
|
1067
|
-
/**
|
|
1068
|
-
* The path of the test file, undefined if test is not ran through a file.
|
|
1069
|
-
*/
|
|
1070
|
-
file?: string;
|
|
1071
1284
|
}
|
|
1072
|
-
interface TestStart {
|
|
1285
|
+
interface TestStart extends TestLocationInfo {
|
|
1073
1286
|
/**
|
|
1074
1287
|
* The test name.
|
|
1075
1288
|
*/
|
|
@@ -1078,30 +1291,38 @@ interface TestStart {
|
|
|
1078
1291
|
* The nesting level of the test.
|
|
1079
1292
|
*/
|
|
1080
1293
|
nesting: number;
|
|
1294
|
+
}
|
|
1295
|
+
interface TestStderr extends TestLocationInfo {
|
|
1081
1296
|
/**
|
|
1082
|
-
* The
|
|
1297
|
+
* The message written to `stderr`
|
|
1083
1298
|
*/
|
|
1084
|
-
|
|
1299
|
+
message: string;
|
|
1085
1300
|
}
|
|
1086
|
-
interface
|
|
1301
|
+
interface TestStdout extends TestLocationInfo {
|
|
1087
1302
|
/**
|
|
1088
|
-
* The
|
|
1303
|
+
* The message written to `stdout`
|
|
1089
1304
|
*/
|
|
1090
|
-
|
|
1305
|
+
message: string;
|
|
1306
|
+
}
|
|
1307
|
+
interface TestEnqueue extends TestLocationInfo {
|
|
1091
1308
|
/**
|
|
1092
|
-
* The
|
|
1309
|
+
* The test name
|
|
1093
1310
|
*/
|
|
1094
|
-
|
|
1311
|
+
name: string;
|
|
1312
|
+
/**
|
|
1313
|
+
* The nesting level of the test.
|
|
1314
|
+
*/
|
|
1315
|
+
nesting: number;
|
|
1095
1316
|
}
|
|
1096
|
-
interface
|
|
1317
|
+
interface TestDequeue extends TestLocationInfo {
|
|
1097
1318
|
/**
|
|
1098
|
-
* The
|
|
1319
|
+
* The test name
|
|
1099
1320
|
*/
|
|
1100
|
-
|
|
1321
|
+
name: string;
|
|
1101
1322
|
/**
|
|
1102
|
-
* The
|
|
1323
|
+
* The nesting level of the test.
|
|
1103
1324
|
*/
|
|
1104
|
-
|
|
1325
|
+
nesting: number;
|
|
1105
1326
|
}
|
|
1106
1327
|
|
|
1107
1328
|
/**
|
|
@@ -1121,17 +1342,20 @@ interface TestStdout {
|
|
|
1121
1342
|
* @since v19.9.0
|
|
1122
1343
|
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/test/reporters.js)
|
|
1123
1344
|
*/
|
|
1124
|
-
declare module
|
|
1125
|
-
import { Transform } from
|
|
1345
|
+
declare module "node:test/reporters" {
|
|
1346
|
+
import { Transform } from "node:stream";
|
|
1126
1347
|
|
|
1127
1348
|
type TestEvent =
|
|
1128
|
-
| { type:
|
|
1129
|
-
| { type:
|
|
1130
|
-
| { type:
|
|
1131
|
-
| { type:
|
|
1132
|
-
| { type:
|
|
1133
|
-
| { type:
|
|
1134
|
-
| { type:
|
|
1349
|
+
| { type: "test:diagnostic"; data: DiagnosticData }
|
|
1350
|
+
| { type: "test:fail"; data: TestFail }
|
|
1351
|
+
| { type: "test:pass"; data: TestPass }
|
|
1352
|
+
| { type: "test:plan"; data: TestPlan }
|
|
1353
|
+
| { type: "test:start"; data: TestStart }
|
|
1354
|
+
| { type: "test:stderr"; data: TestStderr }
|
|
1355
|
+
| { type: "test:stdout"; data: TestStdout }
|
|
1356
|
+
| { type: "test:enqueue"; data: TestEnqueue }
|
|
1357
|
+
| { type: "test:dequeue"; data: TestDequeue }
|
|
1358
|
+
| { type: "test:watch:drained" };
|
|
1135
1359
|
type TestEventGenerator = AsyncGenerator<TestEvent, void>;
|
|
1136
1360
|
|
|
1137
1361
|
/**
|
|
@@ -1150,5 +1374,9 @@ declare module 'node:test/reporters' {
|
|
|
1150
1374
|
class Spec extends Transform {
|
|
1151
1375
|
constructor();
|
|
1152
1376
|
}
|
|
1153
|
-
|
|
1377
|
+
/**
|
|
1378
|
+
* The `junit` reporter outputs test results in a jUnit XML format
|
|
1379
|
+
*/
|
|
1380
|
+
function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
|
|
1381
|
+
export { dot, junit, Spec as spec, tap, TestEvent };
|
|
1154
1382
|
}
|