cloudstructs 0.6.32 → 0.6.34
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 -0
- package/.jsii +3 -3
- package/lib/codecommit-mirror/index.js +2 -2
- package/lib/dmarc/index.js +1 -1
- package/lib/ecs-service-roller/index.js +2 -2
- package/lib/email-receiver/receiver.js +1 -1
- package/lib/saml-identity-provider/index.js +2 -2
- package/lib/slack-app/manifest.js +1 -1
- package/lib/slack-app/slack-app.js +2 -2
- package/lib/slack-events/index.js +1 -1
- package/lib/slack-textract/index.js +1 -1
- package/lib/ssl-server-test/index.js +1 -1
- package/lib/state-machine-cr-provider/index.js +1 -1
- package/lib/static-website/index.js +1 -1
- package/lib/toolkit-cleaner/index.js +1 -1
- package/lib/url-shortener/index.js +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/assert.d.ts +86 -75
- package/node_modules/@slack/logger/node_modules/@types/node/async_hooks.d.ts +66 -49
- package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +136 -97
- package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +81 -55
- package/node_modules/@slack/logger/node_modules/@types/node/cluster.d.ts +12 -12
- package/node_modules/@slack/logger/node_modules/@types/node/console.d.ts +5 -5
- package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +210 -221
- package/node_modules/@slack/logger/node_modules/@types/node/dgram.d.ts +15 -15
- package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
- package/node_modules/@slack/logger/node_modules/@types/node/dns/promises.d.ts +50 -6
- package/node_modules/@slack/logger/node_modules/@types/node/dns.d.ts +25 -16
- package/node_modules/@slack/logger/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +111 -65
- package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +80 -49
- package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +162 -91
- package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +3 -1
- package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +195 -129
- package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +42 -46
- package/node_modules/@slack/logger/node_modules/@types/node/https.d.ts +52 -153
- package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/inspector.d.ts +10 -3
- package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +5 -4
- package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +21 -18
- package/node_modules/@slack/logger/node_modules/@types/node/os.d.ts +22 -18
- package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/path.d.ts +4 -4
- package/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +28 -15
- package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +43 -46
- package/node_modules/@slack/logger/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/querystring.d.ts +5 -5
- package/node_modules/@slack/logger/node_modules/@types/node/readline/promises.d.ts +65 -63
- package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +32 -159
- package/node_modules/@slack/logger/node_modules/@types/node/repl.d.ts +20 -20
- package/node_modules/@slack/logger/node_modules/@types/node/stream/consumers.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +839 -857
- package/node_modules/@slack/logger/node_modules/@types/node/string_decoder.d.ts +6 -6
- package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +498 -206
- package/node_modules/@slack/logger/node_modules/@types/node/timers/promises.d.ts +3 -3
- package/node_modules/@slack/logger/node_modules/@types/node/timers.d.ts +122 -8
- package/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +34 -22
- package/node_modules/@slack/logger/node_modules/@types/node/trace_events.d.ts +20 -9
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/console.d.ts +5 -5
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/events.d.ts +111 -65
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/http.d.ts +202 -129
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/https.d.ts +52 -153
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/module.d.ts +5 -4
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/net.d.ts +24 -21
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/os.d.ts +22 -18
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/path.d.ts +4 -4
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/process.d.ts +43 -46
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/test.d.ts +498 -206
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/url.d.ts +46 -42
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/util.d.ts +150 -109
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
- package/node_modules/@slack/logger/node_modules/@types/node/tty.d.ts +4 -5
- package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +46 -42
- package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +150 -109
- package/node_modules/@slack/logger/node_modules/@types/node/v8.d.ts +204 -16
- package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +292 -42
- package/node_modules/@slack/logger/node_modules/@types/node/wasi.d.ts +13 -19
- package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +38 -34
- package/node_modules/@slack/logger/node_modules/@types/node/zlib.d.ts +11 -11
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/assert.d.ts +86 -75
- package/node_modules/@slack/web-api/node_modules/@types/node/async_hooks.d.ts +66 -49
- package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +136 -97
- package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +81 -55
- package/node_modules/@slack/web-api/node_modules/@types/node/cluster.d.ts +12 -12
- package/node_modules/@slack/web-api/node_modules/@types/node/console.d.ts +5 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +210 -221
- package/node_modules/@slack/web-api/node_modules/@types/node/dgram.d.ts +15 -15
- package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
- package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +50 -6
- package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +25 -16
- package/node_modules/@slack/web-api/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +111 -65
- package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +80 -49
- package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +162 -91
- package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +3 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +195 -129
- package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +42 -46
- package/node_modules/@slack/web-api/node_modules/@types/node/https.d.ts +52 -153
- package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/inspector.d.ts +10 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +5 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +21 -18
- package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +22 -18
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/path.d.ts +4 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +28 -15
- package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +43 -46
- package/node_modules/@slack/web-api/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/querystring.d.ts +5 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/readline/promises.d.ts +65 -63
- package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +32 -159
- package/node_modules/@slack/web-api/node_modules/@types/node/repl.d.ts +20 -20
- package/node_modules/@slack/web-api/node_modules/@types/node/stream/consumers.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +839 -857
- package/node_modules/@slack/web-api/node_modules/@types/node/string_decoder.d.ts +6 -6
- package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +498 -206
- package/node_modules/@slack/web-api/node_modules/@types/node/timers/promises.d.ts +3 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/timers.d.ts +122 -8
- package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +34 -22
- package/node_modules/@slack/web-api/node_modules/@types/node/trace_events.d.ts +20 -9
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/console.d.ts +5 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/events.d.ts +111 -65
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/http.d.ts +202 -129
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/https.d.ts +52 -153
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/module.d.ts +5 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/net.d.ts +24 -21
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/os.d.ts +22 -18
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/path.d.ts +4 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/process.d.ts +43 -46
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/test.d.ts +498 -206
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/url.d.ts +46 -42
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/util.d.ts +150 -109
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
- package/node_modules/@slack/web-api/node_modules/@types/node/tty.d.ts +4 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +46 -42
- package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +150 -109
- package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +204 -16
- package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +292 -42
- package/node_modules/@slack/web-api/node_modules/@types/node/wasi.d.ts +13 -19
- package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +38 -34
- package/node_modules/@slack/web-api/node_modules/@types/node/zlib.d.ts +11 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +86 -75
- package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +66 -49
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +136 -97
- package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +81 -55
- package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +12 -12
- package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +5 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +210 -221
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +15 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +50 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +25 -16
- 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 +111 -65
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +80 -49
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +162 -91
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +3 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +195 -129
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +42 -46
- package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +52 -153
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +10 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +5 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +21 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +22 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +28 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +43 -46
- package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +5 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +65 -63
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +32 -159
- package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +20 -20
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +839 -857
- package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +6 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +498 -206
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +122 -8
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +34 -22
- package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +20 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/console.d.ts +5 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
- 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 +111 -65
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +202 -129
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +52 -153
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +5 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +24 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/os.d.ts +22 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/path.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/process.d.ts +43 -46
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +498 -206
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/url.d.ts +46 -42
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +150 -109
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +4 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +46 -42
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +150 -109
- package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +204 -16
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +292 -42
- package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +13 -19
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +38 -34
- package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +11 -11
- package/node_modules/@types/is-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/assert.d.ts +86 -75
- package/node_modules/@types/is-stream/node_modules/@types/node/async_hooks.d.ts +66 -49
- package/node_modules/@types/is-stream/node_modules/@types/node/buffer.d.ts +136 -97
- package/node_modules/@types/is-stream/node_modules/@types/node/child_process.d.ts +81 -55
- package/node_modules/@types/is-stream/node_modules/@types/node/cluster.d.ts +12 -12
- package/node_modules/@types/is-stream/node_modules/@types/node/console.d.ts +5 -5
- package/node_modules/@types/is-stream/node_modules/@types/node/crypto.d.ts +210 -221
- package/node_modules/@types/is-stream/node_modules/@types/node/dgram.d.ts +15 -15
- package/node_modules/@types/is-stream/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
- package/node_modules/@types/is-stream/node_modules/@types/node/dns/promises.d.ts +50 -6
- package/node_modules/@types/is-stream/node_modules/@types/node/dns.d.ts +25 -16
- package/node_modules/@types/is-stream/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/is-stream/node_modules/@types/node/events.d.ts +111 -65
- package/node_modules/@types/is-stream/node_modules/@types/node/fs/promises.d.ts +80 -49
- package/node_modules/@types/is-stream/node_modules/@types/node/fs.d.ts +162 -91
- package/node_modules/@types/is-stream/node_modules/@types/node/globals.d.ts +3 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/http.d.ts +195 -129
- package/node_modules/@types/is-stream/node_modules/@types/node/http2.d.ts +42 -46
- package/node_modules/@types/is-stream/node_modules/@types/node/https.d.ts +52 -153
- package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/inspector.d.ts +10 -3
- package/node_modules/@types/is-stream/node_modules/@types/node/module.d.ts +5 -4
- package/node_modules/@types/is-stream/node_modules/@types/node/net.d.ts +21 -18
- package/node_modules/@types/is-stream/node_modules/@types/node/os.d.ts +22 -18
- package/node_modules/@types/is-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/is-stream/node_modules/@types/node/path.d.ts +4 -4
- package/node_modules/@types/is-stream/node_modules/@types/node/perf_hooks.d.ts +28 -15
- package/node_modules/@types/is-stream/node_modules/@types/node/process.d.ts +43 -46
- package/node_modules/@types/is-stream/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/querystring.d.ts +5 -5
- package/node_modules/@types/is-stream/node_modules/@types/node/readline/promises.d.ts +65 -63
- package/node_modules/@types/is-stream/node_modules/@types/node/readline.d.ts +32 -159
- package/node_modules/@types/is-stream/node_modules/@types/node/repl.d.ts +20 -20
- package/node_modules/@types/is-stream/node_modules/@types/node/stream/consumers.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/stream.d.ts +839 -857
- package/node_modules/@types/is-stream/node_modules/@types/node/string_decoder.d.ts +6 -6
- package/node_modules/@types/is-stream/node_modules/@types/node/test.d.ts +498 -206
- package/node_modules/@types/is-stream/node_modules/@types/node/timers/promises.d.ts +3 -3
- package/node_modules/@types/is-stream/node_modules/@types/node/timers.d.ts +122 -8
- package/node_modules/@types/is-stream/node_modules/@types/node/tls.d.ts +34 -22
- package/node_modules/@types/is-stream/node_modules/@types/node/trace_events.d.ts +20 -9
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/console.d.ts +5 -5
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/events.d.ts +111 -65
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/http.d.ts +202 -129
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/https.d.ts +52 -153
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/module.d.ts +5 -4
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/net.d.ts +24 -21
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/os.d.ts +22 -18
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/path.d.ts +4 -4
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/process.d.ts +43 -46
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/test.d.ts +498 -206
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/url.d.ts +46 -42
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/util.d.ts +150 -109
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
- package/node_modules/@types/is-stream/node_modules/@types/node/tty.d.ts +4 -5
- package/node_modules/@types/is-stream/node_modules/@types/node/url.d.ts +46 -42
- package/node_modules/@types/is-stream/node_modules/@types/node/util.d.ts +150 -109
- package/node_modules/@types/is-stream/node_modules/@types/node/v8.d.ts +204 -16
- package/node_modules/@types/is-stream/node_modules/@types/node/vm.d.ts +292 -42
- package/node_modules/@types/is-stream/node_modules/@types/node/wasi.d.ts +13 -19
- package/node_modules/@types/is-stream/node_modules/@types/node/worker_threads.d.ts +38 -34
- package/node_modules/@types/is-stream/node_modules/@types/node/zlib.d.ts +11 -11
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +86 -75
- package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +66 -49
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +136 -97
- package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +81 -55
- package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +12 -12
- package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +5 -5
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +210 -221
- package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +15 -15
- package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
- package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +50 -6
- package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +25 -16
- 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 +111 -65
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +80 -49
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +162 -91
- package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +3 -1
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +195 -129
- package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +42 -46
- package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +52 -153
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +10 -3
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +5 -4
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +21 -18
- package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +22 -18
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +28 -15
- package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +43 -46
- package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +5 -5
- package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +65 -63
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +32 -159
- package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +20 -20
- package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +839 -857
- package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +6 -6
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +498 -206
- package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +122 -8
- package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +34 -22
- package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +20 -9
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/console.d.ts +5 -5
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
- 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 +111 -65
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +202 -129
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +52 -153
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +5 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +24 -21
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/os.d.ts +22 -18
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/path.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/process.d.ts +43 -46
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +498 -206
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/url.d.ts +46 -42
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +150 -109
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
- package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +4 -5
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +46 -42
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +150 -109
- package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +204 -16
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +292 -42
- package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +13 -19
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +38 -34
- package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +11 -11
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +86 -75
- package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +66 -49
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +136 -97
- package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +81 -55
- package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +12 -12
- package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +5 -5
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +210 -221
- package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +15 -15
- package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
- package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +50 -6
- package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +25 -16
- 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 +111 -65
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +80 -49
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +162 -91
- package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +3 -1
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +195 -129
- package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +42 -46
- package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +52 -153
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +10 -3
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +5 -4
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +21 -18
- package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +22 -18
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +28 -15
- package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +43 -46
- package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +5 -5
- package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +65 -63
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +32 -159
- package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +20 -20
- package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +839 -857
- package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +6 -6
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +498 -206
- package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +122 -8
- package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +34 -22
- package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +20 -9
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/console.d.ts +5 -5
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
- 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 +111 -65
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +202 -129
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +52 -153
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +5 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +24 -21
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/os.d.ts +22 -18
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/path.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/process.d.ts +43 -46
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +498 -206
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/url.d.ts +46 -42
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +150 -109
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
- package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +4 -5
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +46 -42
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +150 -109
- package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +204 -16
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +292 -42
- package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +13 -19
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +38 -34
- package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +11 -11
- package/package.json +20 -20
|
@@ -1,28 +1,112 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `node:test` module
|
|
3
|
-
*
|
|
2
|
+
* The `node:test` module facilitates the creation of JavaScript tests.
|
|
3
|
+
* To access it:
|
|
4
|
+
*
|
|
5
|
+
* ```js
|
|
6
|
+
* import test from 'node:test';
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* This module is only available under the `node:` scheme. The following will not
|
|
10
|
+
* work:
|
|
11
|
+
*
|
|
12
|
+
* ```js
|
|
13
|
+
* import test from 'test';
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Tests created via the `test` module consist of a single function that is
|
|
17
|
+
* processed in one of three ways:
|
|
18
|
+
*
|
|
19
|
+
* 1. A synchronous function that is considered failing if it throws an exception,
|
|
20
|
+
* and is considered passing otherwise.
|
|
21
|
+
* 2. A function that returns a `Promise` that is considered failing if the`Promise` rejects, and is considered passing if the `Promise` resolves.
|
|
22
|
+
* 3. A function that receives a callback function. If the callback receives any
|
|
23
|
+
* truthy value as its first argument, the test is considered failing. If a
|
|
24
|
+
* falsy value is passed as the first argument to the callback, the test is
|
|
25
|
+
* considered passing. If the test function receives a callback function and
|
|
26
|
+
* also returns a `Promise`, the test will fail.
|
|
27
|
+
*
|
|
28
|
+
* The following example illustrates how tests are written using the`test` module.
|
|
29
|
+
*
|
|
30
|
+
* ```js
|
|
31
|
+
* test('synchronous passing test', (t) => {
|
|
32
|
+
* // This test passes because it does not throw an exception.
|
|
33
|
+
* assert.strictEqual(1, 1);
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* test('synchronous failing test', (t) => {
|
|
37
|
+
* // This test fails because it throws an exception.
|
|
38
|
+
* assert.strictEqual(1, 2);
|
|
39
|
+
* });
|
|
40
|
+
*
|
|
41
|
+
* test('asynchronous passing test', async (t) => {
|
|
42
|
+
* // This test passes because the Promise returned by the async
|
|
43
|
+
* // function is not rejected.
|
|
44
|
+
* assert.strictEqual(1, 1);
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* test('asynchronous failing test', async (t) => {
|
|
48
|
+
* // This test fails because the Promise returned by the async
|
|
49
|
+
* // function is rejected.
|
|
50
|
+
* assert.strictEqual(1, 2);
|
|
51
|
+
* });
|
|
52
|
+
*
|
|
53
|
+
* test('failing test using Promises', (t) => {
|
|
54
|
+
* // Promises can be used directly as well.
|
|
55
|
+
* return new Promise((resolve, reject) => {
|
|
56
|
+
* setImmediate(() => {
|
|
57
|
+
* reject(new Error('this will cause the test to fail'));
|
|
58
|
+
* });
|
|
59
|
+
* });
|
|
60
|
+
* });
|
|
61
|
+
*
|
|
62
|
+
* test('callback passing test', (t, done) => {
|
|
63
|
+
* // done() is the callback function. When the setImmediate() runs, it invokes
|
|
64
|
+
* // done() with no arguments.
|
|
65
|
+
* setImmediate(done);
|
|
66
|
+
* });
|
|
67
|
+
*
|
|
68
|
+
* test('callback failing test', (t, done) => {
|
|
69
|
+
* // When the setImmediate() runs, done() is invoked with an Error object and
|
|
70
|
+
* // the test fails.
|
|
71
|
+
* setImmediate(() => {
|
|
72
|
+
* done(new Error('callback failure'));
|
|
73
|
+
* });
|
|
74
|
+
* });
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* If any tests fail, the process exit code is set to `1`.
|
|
78
|
+
* @since v18.0.0, v16.17.0
|
|
79
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/test.js)
|
|
4
80
|
*/
|
|
5
81
|
declare module 'node:test' {
|
|
82
|
+
import { Readable } from 'node:stream';
|
|
6
83
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
84
|
+
* ```js
|
|
85
|
+
* import { tap } from 'node:test/reporters';
|
|
86
|
+
* import process from 'node:process';
|
|
87
|
+
*
|
|
88
|
+
* run({ files: [path.resolve('./tests/test.js')] })
|
|
89
|
+
* .compose(tap)
|
|
90
|
+
* .pipe(process.stdout);
|
|
91
|
+
* ```
|
|
92
|
+
* @since v18.9.0, v16.19.0
|
|
93
|
+
* @param options Configuration options for running tests. The following properties are supported:
|
|
11
94
|
*/
|
|
12
95
|
function run(options?: RunOptions): TestsStream;
|
|
13
|
-
|
|
14
96
|
/**
|
|
15
|
-
* The `test()` function is the value imported from the test module. Each
|
|
16
|
-
* function results in reporting the test to the
|
|
97
|
+
* The `test()` function is the value imported from the `test` module. Each
|
|
98
|
+
* invocation of this function results in reporting the test to the `TestsStream`.
|
|
17
99
|
*
|
|
18
|
-
* The
|
|
19
|
-
* related to the current test. Examples include skipping the test, adding
|
|
20
|
-
* diagnostic information, or creating subtests.
|
|
100
|
+
* The `TestContext` object passed to the `fn` argument can be used to perform
|
|
101
|
+
* actions related to the current test. Examples include skipping the test, adding
|
|
102
|
+
* additional diagnostic information, or creating subtests.
|
|
21
103
|
*
|
|
22
|
-
* `test()` returns a
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
104
|
+
* `test()` returns a `Promise` that resolves once the test completes.
|
|
105
|
+
* if `test()` is called within a `describe()` block, it resolve immediately.
|
|
106
|
+
* The return value can usually be discarded for top level tests.
|
|
107
|
+
* However, the return value from subtests should be used to prevent the parent
|
|
108
|
+
* test from finishing first and cancelling the subtest
|
|
109
|
+
* as shown in the following example.
|
|
26
110
|
*
|
|
27
111
|
* ```js
|
|
28
112
|
* test('top level test', async (t) => {
|
|
@@ -36,90 +120,144 @@ declare module 'node:test' {
|
|
|
36
120
|
* });
|
|
37
121
|
* });
|
|
38
122
|
* ```
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* @
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* @
|
|
123
|
+
*
|
|
124
|
+
* The `timeout` option can be used to fail the test if it takes longer than`timeout` milliseconds to complete. However, it is not a reliable mechanism for
|
|
125
|
+
* canceling tests because a running test might block the application thread and
|
|
126
|
+
* thus prevent the scheduled cancellation.
|
|
127
|
+
* @since v18.0.0, v16.17.0
|
|
128
|
+
* @param [name='The name'] The name of the test, which is displayed when reporting test results.
|
|
129
|
+
* @param options Configuration options for the test. The following properties are supported:
|
|
130
|
+
* @param [fn='A no-op function'] The function under test. The first argument to this function is a {@link TestContext} object. If the test uses callbacks, the callback function is passed as the
|
|
131
|
+
* second argument.
|
|
132
|
+
* @return Resolved with `undefined` once the test completes, or immediately if the test runs within {@link describe}.
|
|
47
133
|
*/
|
|
48
134
|
function test(name?: string, fn?: TestFn): Promise<void>;
|
|
49
135
|
function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
50
136
|
function test(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
51
137
|
function test(fn?: TestFn): Promise<void>;
|
|
52
|
-
|
|
138
|
+
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
|
+
};
|
|
153
|
+
}
|
|
53
154
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @param
|
|
155
|
+
* The `describe()` function imported from the `node:test` module. Each
|
|
156
|
+
* invocation of this function results in the creation of a Subtest.
|
|
157
|
+
* After invocation of top level `describe` functions,
|
|
158
|
+
* all top level tests and suites will execute.
|
|
159
|
+
* @param [name='The name'] The name of the suite, which is displayed when reporting test results.
|
|
160
|
+
* @param options Configuration options for the suite. supports the same options as `test([name][, options][, fn])`.
|
|
161
|
+
* @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`.
|
|
59
163
|
*/
|
|
60
164
|
function describe(name?: string, options?: TestOptions, fn?: SuiteFn): void;
|
|
61
165
|
function describe(name?: string, fn?: SuiteFn): void;
|
|
62
166
|
function describe(options?: TestOptions, fn?: SuiteFn): void;
|
|
63
167
|
function describe(fn?: SuiteFn): void;
|
|
64
168
|
namespace describe {
|
|
65
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`.
|
|
171
|
+
*/
|
|
66
172
|
function skip(name?: string, options?: TestOptions, fn?: SuiteFn): void;
|
|
67
173
|
function skip(name?: string, fn?: SuiteFn): void;
|
|
68
174
|
function skip(options?: TestOptions, fn?: SuiteFn): void;
|
|
69
175
|
function skip(fn?: SuiteFn): void;
|
|
70
|
-
|
|
71
|
-
|
|
176
|
+
/**
|
|
177
|
+
* Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.
|
|
178
|
+
*/
|
|
72
179
|
function todo(name?: string, options?: TestOptions, fn?: SuiteFn): void;
|
|
73
180
|
function todo(name?: string, fn?: SuiteFn): void;
|
|
74
181
|
function todo(options?: TestOptions, fn?: SuiteFn): void;
|
|
75
182
|
function todo(fn?: SuiteFn): void;
|
|
183
|
+
/**
|
|
184
|
+
* Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
|
|
185
|
+
* @since v18.15.0
|
|
186
|
+
*/
|
|
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;
|
|
76
191
|
}
|
|
77
|
-
|
|
78
192
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* @
|
|
83
|
-
* @param fn The function under test. If the test uses callbacks, the callback function is
|
|
84
|
-
* passed as the second argument. Default: A no-op function.
|
|
193
|
+
* Shorthand for `test()`.
|
|
194
|
+
*
|
|
195
|
+
* The `it()` function is imported from the `node:test` module.
|
|
196
|
+
* @since v18.6.0, v16.17.0
|
|
85
197
|
*/
|
|
86
|
-
function it(name?: string, options?: TestOptions, fn?:
|
|
87
|
-
function it(name?: string, fn?:
|
|
88
|
-
function it(options?: TestOptions, fn?:
|
|
89
|
-
function it(fn?:
|
|
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;
|
|
90
202
|
namespace it {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
function skip(options?: TestOptions, fn?:
|
|
95
|
-
function skip(fn?:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
function todo(fn?:
|
|
203
|
+
/**
|
|
204
|
+
* Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
|
|
205
|
+
*/
|
|
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;
|
|
210
|
+
/**
|
|
211
|
+
* Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
|
|
212
|
+
*/
|
|
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;
|
|
217
|
+
/**
|
|
218
|
+
* Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
|
|
219
|
+
* @since v18.15.0
|
|
220
|
+
*/
|
|
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;
|
|
102
225
|
}
|
|
103
|
-
|
|
226
|
+
/**
|
|
227
|
+
* Shorthand for skipping a test, same as `test([name], { skip: true }[, fn])`.
|
|
228
|
+
* @since v20.2.0
|
|
229
|
+
*/
|
|
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;
|
|
234
|
+
/**
|
|
235
|
+
* Shorthand for marking a test as `TODO`, same as `test([name], { todo: true }[, fn])`.
|
|
236
|
+
* @since v20.2.0
|
|
237
|
+
*/
|
|
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;
|
|
242
|
+
/**
|
|
243
|
+
* Shorthand for marking a test as `only`, same as `test([name], { only: true }[, fn])`.
|
|
244
|
+
* @since v20.2.0
|
|
245
|
+
*/
|
|
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;
|
|
104
250
|
/**
|
|
105
251
|
* The type of a function under test. The first argument to this function is a
|
|
106
252
|
* {@link TestContext} object. If the test uses callbacks, the callback function is passed as
|
|
107
253
|
* the second argument.
|
|
108
254
|
*/
|
|
109
255
|
type TestFn = (t: TestContext, done: (result?: any) => void) => any;
|
|
110
|
-
|
|
111
256
|
/**
|
|
112
257
|
* The type of a function under Suite.
|
|
113
258
|
* If the test uses callbacks, the callback function is passed as an argument
|
|
114
259
|
*/
|
|
115
260
|
type SuiteFn = (done: (result?: any) => void) => void;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* The type of a function under test.
|
|
119
|
-
* If the test uses callbacks, the callback function is passed as an argument
|
|
120
|
-
*/
|
|
121
|
-
type ItFn = (done: (result?: any) => void) => any;
|
|
122
|
-
|
|
123
261
|
interface RunOptions {
|
|
124
262
|
/**
|
|
125
263
|
* If a number is provided, then that many files would run in parallel.
|
|
@@ -129,41 +267,41 @@ declare module 'node:test' {
|
|
|
129
267
|
* @default true
|
|
130
268
|
*/
|
|
131
269
|
concurrency?: number | boolean | undefined;
|
|
132
|
-
|
|
133
270
|
/**
|
|
134
271
|
* An array containing the list of files to run.
|
|
135
272
|
* If unspecified, the test runner execution model will be used.
|
|
136
273
|
*/
|
|
137
274
|
files?: readonly string[] | undefined;
|
|
138
|
-
|
|
139
275
|
/**
|
|
140
276
|
* Allows aborting an in-progress test execution.
|
|
141
277
|
* @default undefined
|
|
142
278
|
*/
|
|
143
279
|
signal?: AbortSignal | undefined;
|
|
144
|
-
|
|
145
280
|
/**
|
|
146
281
|
* A number of milliseconds the test will fail after.
|
|
147
282
|
* If unspecified, subtests inherit this value from their parent.
|
|
148
283
|
* @default Infinity
|
|
149
284
|
*/
|
|
150
285
|
timeout?: number | undefined;
|
|
151
|
-
|
|
152
286
|
/**
|
|
153
287
|
* Sets inspector port of test child process.
|
|
154
288
|
* If a nullish value is provided, each process gets its own port,
|
|
155
289
|
* incremented from the primary's `process.debugPort`.
|
|
156
290
|
*/
|
|
157
291
|
inspectPort?: number | (() => number) | undefined;
|
|
292
|
+
/**
|
|
293
|
+
* That can be used to only run tests whose name matches the provided pattern.
|
|
294
|
+
* Test name patterns are interpreted as JavaScript regular expressions.
|
|
295
|
+
* For each test that is executed, any corresponding test hooks, such as `beforeEach()`, are also run.
|
|
296
|
+
*/
|
|
297
|
+
testNamePatterns?: string | RegExp | string[] | RegExp[];
|
|
158
298
|
}
|
|
159
|
-
|
|
160
299
|
/**
|
|
161
|
-
* A successful call
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
* @since v18.9.0
|
|
300
|
+
* 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
|
|
301
|
+
* order of the tests definition
|
|
302
|
+
* @since v18.9.0, v16.19.0
|
|
165
303
|
*/
|
|
166
|
-
|
|
304
|
+
class TestsStream extends Readable implements NodeJS.ReadableStream {
|
|
167
305
|
addListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
|
|
168
306
|
addListener(event: 'test:fail', listener: (data: TestFail) => void): this;
|
|
169
307
|
addListener(event: 'test:pass', listener: (data: TestPass) => void): this;
|
|
@@ -201,19 +339,16 @@ declare module 'node:test' {
|
|
|
201
339
|
prependOnceListener(event: 'test:start', listener: (data: TestStart) => void): this;
|
|
202
340
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
203
341
|
}
|
|
204
|
-
|
|
205
342
|
interface DiagnosticData {
|
|
206
343
|
/**
|
|
207
344
|
* The diagnostic message.
|
|
208
345
|
*/
|
|
209
346
|
message: string;
|
|
210
|
-
|
|
211
347
|
/**
|
|
212
348
|
* The nesting level of the test.
|
|
213
349
|
*/
|
|
214
350
|
nesting: number;
|
|
215
351
|
}
|
|
216
|
-
|
|
217
352
|
interface TestFail {
|
|
218
353
|
/**
|
|
219
354
|
* Additional execution metadata.
|
|
@@ -223,39 +358,32 @@ declare module 'node:test' {
|
|
|
223
358
|
* The duration of the test in milliseconds.
|
|
224
359
|
*/
|
|
225
360
|
duration: number;
|
|
226
|
-
|
|
227
361
|
/**
|
|
228
362
|
* The error thrown by the test.
|
|
229
363
|
*/
|
|
230
364
|
error: Error;
|
|
231
365
|
};
|
|
232
|
-
|
|
233
366
|
/**
|
|
234
367
|
* The test name.
|
|
235
368
|
*/
|
|
236
369
|
name: string;
|
|
237
|
-
|
|
238
370
|
/**
|
|
239
371
|
* The nesting level of the test.
|
|
240
372
|
*/
|
|
241
373
|
nesting: number;
|
|
242
|
-
|
|
243
374
|
/**
|
|
244
375
|
* The ordinal number of the test.
|
|
245
376
|
*/
|
|
246
377
|
testNumber: number;
|
|
247
|
-
|
|
248
378
|
/**
|
|
249
379
|
* Present if `context.todo` is called.
|
|
250
380
|
*/
|
|
251
381
|
todo?: string | boolean;
|
|
252
|
-
|
|
253
382
|
/**
|
|
254
383
|
* Present if `context.skip` is called.
|
|
255
384
|
*/
|
|
256
385
|
skip?: string | boolean;
|
|
257
386
|
}
|
|
258
|
-
|
|
259
387
|
interface TestPass {
|
|
260
388
|
/**
|
|
261
389
|
* Additional execution metadata.
|
|
@@ -266,63 +394,62 @@ declare module 'node:test' {
|
|
|
266
394
|
*/
|
|
267
395
|
duration: number;
|
|
268
396
|
};
|
|
269
|
-
|
|
270
397
|
/**
|
|
271
398
|
* The test name.
|
|
272
399
|
*/
|
|
273
400
|
name: string;
|
|
274
|
-
|
|
275
401
|
/**
|
|
276
402
|
* The nesting level of the test.
|
|
277
403
|
*/
|
|
278
404
|
nesting: number;
|
|
279
|
-
|
|
280
405
|
/**
|
|
281
406
|
* The ordinal number of the test.
|
|
282
407
|
*/
|
|
283
408
|
testNumber: number;
|
|
284
|
-
|
|
285
409
|
/**
|
|
286
410
|
* Present if `context.todo` is called.
|
|
287
411
|
*/
|
|
288
412
|
todo?: string | boolean;
|
|
289
|
-
|
|
290
413
|
/**
|
|
291
414
|
* Present if `context.skip` is called.
|
|
292
415
|
*/
|
|
293
416
|
skip?: string | boolean;
|
|
294
417
|
}
|
|
295
|
-
|
|
296
418
|
interface TestPlan {
|
|
297
419
|
/**
|
|
298
420
|
* The nesting level of the test.
|
|
299
421
|
*/
|
|
300
422
|
nesting: number;
|
|
301
|
-
|
|
302
423
|
/**
|
|
303
424
|
* The number of subtests that have ran.
|
|
304
425
|
*/
|
|
305
426
|
count: number;
|
|
306
427
|
}
|
|
307
|
-
|
|
308
428
|
interface TestStart {
|
|
309
429
|
/**
|
|
310
430
|
* The test name.
|
|
311
431
|
*/
|
|
312
432
|
name: string;
|
|
313
|
-
|
|
314
433
|
/**
|
|
315
434
|
* The nesting level of the test.
|
|
316
435
|
*/
|
|
317
436
|
nesting: number;
|
|
318
437
|
}
|
|
319
|
-
|
|
320
438
|
/**
|
|
321
|
-
* An instance of `TestContext` is passed to each test function in order to
|
|
322
|
-
* test runner. However, the `TestContext` constructor is not
|
|
323
|
-
*
|
|
439
|
+
* An instance of `TestContext` is passed to each test function in order to
|
|
440
|
+
* interact with the test runner. However, the `TestContext` constructor is not
|
|
441
|
+
* exposed as part of the API.
|
|
442
|
+
* @since v18.0.0, v16.17.0
|
|
324
443
|
*/
|
|
325
|
-
|
|
444
|
+
class TestContext {
|
|
445
|
+
/**
|
|
446
|
+
* This function is used to create a hook running before subtest of the current test.
|
|
447
|
+
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
|
448
|
+
* the second argument. Default: A no-op function.
|
|
449
|
+
* @param options Configuration options for the hook.
|
|
450
|
+
* @since v20.1.0
|
|
451
|
+
*/
|
|
452
|
+
before: typeof before;
|
|
326
453
|
/**
|
|
327
454
|
* This function is used to create a hook running before each subtest of the current test.
|
|
328
455
|
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
|
@@ -331,7 +458,6 @@ declare module 'node:test' {
|
|
|
331
458
|
* @since v18.8.0
|
|
332
459
|
*/
|
|
333
460
|
beforeEach: typeof beforeEach;
|
|
334
|
-
|
|
335
461
|
/**
|
|
336
462
|
* This function is used to create a hook that runs after the current test finishes.
|
|
337
463
|
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
|
@@ -340,7 +466,6 @@ declare module 'node:test' {
|
|
|
340
466
|
* @since v18.13.0
|
|
341
467
|
*/
|
|
342
468
|
after: typeof after;
|
|
343
|
-
|
|
344
469
|
/**
|
|
345
470
|
* This function is used to create a hook running after each subtest of the current test.
|
|
346
471
|
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
|
@@ -349,54 +474,84 @@ declare module 'node:test' {
|
|
|
349
474
|
* @since v18.8.0
|
|
350
475
|
*/
|
|
351
476
|
afterEach: typeof afterEach;
|
|
352
|
-
|
|
353
477
|
/**
|
|
354
|
-
* This function is used to write diagnostics to the output. Any diagnostic
|
|
355
|
-
* included at the end of the test's results. This function does
|
|
478
|
+
* This function is used to write diagnostics to the output. Any diagnostic
|
|
479
|
+
* information is included at the end of the test's results. This function does
|
|
480
|
+
* not return a value.
|
|
481
|
+
*
|
|
482
|
+
* ```js
|
|
483
|
+
* test('top level test', (t) => {
|
|
484
|
+
* t.diagnostic('A diagnostic message');
|
|
485
|
+
* });
|
|
486
|
+
* ```
|
|
487
|
+
* @since v18.0.0, v16.17.0
|
|
356
488
|
* @param message Message to be reported.
|
|
357
|
-
* @since v18.0.0
|
|
358
489
|
*/
|
|
359
490
|
diagnostic(message: string): void;
|
|
360
|
-
|
|
361
491
|
/**
|
|
362
492
|
* The name of the test.
|
|
363
|
-
* @since v18.8.0
|
|
493
|
+
* @since v18.8.0, v16.18.0
|
|
364
494
|
*/
|
|
365
495
|
readonly name: string;
|
|
366
|
-
|
|
367
496
|
/**
|
|
368
|
-
* If `shouldRunOnlyTests` is truthy, the test context will only run tests that
|
|
369
|
-
* option set. Otherwise, all tests are run. If Node.js was not
|
|
370
|
-
* command-line option, this function is a
|
|
497
|
+
* If `shouldRunOnlyTests` is truthy, the test context will only run tests that
|
|
498
|
+
* have the `only` option set. Otherwise, all tests are run. If Node.js was not
|
|
499
|
+
* started with the `--test-only` command-line option, this function is a
|
|
500
|
+
* no-op.
|
|
501
|
+
*
|
|
502
|
+
* ```js
|
|
503
|
+
* test('top level test', (t) => {
|
|
504
|
+
* // The test context can be set to run subtests with the 'only' option.
|
|
505
|
+
* t.runOnly(true);
|
|
506
|
+
* return Promise.all([
|
|
507
|
+
* t.test('this subtest is now skipped'),
|
|
508
|
+
* t.test('this subtest is run', { only: true }),
|
|
509
|
+
* ]);
|
|
510
|
+
* });
|
|
511
|
+
* ```
|
|
512
|
+
* @since v18.0.0, v16.17.0
|
|
371
513
|
* @param shouldRunOnlyTests Whether or not to run `only` tests.
|
|
372
|
-
* @since v18.0.0
|
|
373
514
|
*/
|
|
374
515
|
runOnly(shouldRunOnlyTests: boolean): void;
|
|
375
|
-
|
|
376
516
|
/**
|
|
377
|
-
*
|
|
378
|
-
*
|
|
517
|
+
* ```js
|
|
518
|
+
* test('top level test', async (t) => {
|
|
519
|
+
* await fetch('some/uri', { signal: t.signal });
|
|
520
|
+
* });
|
|
521
|
+
* ```
|
|
522
|
+
* @since v18.7.0, v16.17.0
|
|
379
523
|
*/
|
|
380
524
|
readonly signal: AbortSignal;
|
|
381
|
-
|
|
382
525
|
/**
|
|
383
|
-
* This function causes the test's output to indicate the test as skipped. If
|
|
384
|
-
*
|
|
385
|
-
*
|
|
526
|
+
* This function causes the test's output to indicate the test as skipped. If`message` is provided, it is included in the output. Calling `skip()` does
|
|
527
|
+
* not terminate execution of the test function. This function does not return a
|
|
528
|
+
* value.
|
|
529
|
+
*
|
|
530
|
+
* ```js
|
|
531
|
+
* test('top level test', (t) => {
|
|
532
|
+
* // Make sure to return here as well if the test contains additional logic.
|
|
533
|
+
* t.skip('this is skipped');
|
|
534
|
+
* });
|
|
535
|
+
* ```
|
|
536
|
+
* @since v18.0.0, v16.17.0
|
|
386
537
|
* @param message Optional skip message.
|
|
387
|
-
* @since v18.0.0
|
|
388
538
|
*/
|
|
389
539
|
skip(message?: string): void;
|
|
390
|
-
|
|
391
540
|
/**
|
|
392
|
-
* This function adds a `TODO` directive to the test's output. If `message` is
|
|
393
|
-
* included in the output. Calling `todo()` does not terminate
|
|
394
|
-
* function. This function does not return a value.
|
|
541
|
+
* This function adds a `TODO` directive to the test's output. If `message` is
|
|
542
|
+
* provided, it is included in the output. Calling `todo()` does not terminate
|
|
543
|
+
* execution of the test function. This function does not return a value.
|
|
544
|
+
*
|
|
545
|
+
* ```js
|
|
546
|
+
* test('top level test', (t) => {
|
|
547
|
+
* // This test is marked as `TODO`
|
|
548
|
+
* t.todo('this is a todo');
|
|
549
|
+
* });
|
|
550
|
+
* ```
|
|
551
|
+
* @since v18.0.0, v16.17.0
|
|
395
552
|
* @param message Optional `TODO` message.
|
|
396
|
-
* @since v18.0.0
|
|
397
553
|
*/
|
|
398
554
|
todo(message?: string): void;
|
|
399
|
-
|
|
400
555
|
/**
|
|
401
556
|
* This function is used to create subtests under the current test. This function behaves in
|
|
402
557
|
* the same fashion as the top level {@link test} function.
|
|
@@ -415,7 +570,6 @@ declare module 'node:test' {
|
|
|
415
570
|
*/
|
|
416
571
|
readonly mock: MockTracker;
|
|
417
572
|
}
|
|
418
|
-
|
|
419
573
|
interface TestOptions {
|
|
420
574
|
/**
|
|
421
575
|
* If a number is provided, then that many tests would run in parallel.
|
|
@@ -426,27 +580,23 @@ declare module 'node:test' {
|
|
|
426
580
|
* @default false
|
|
427
581
|
*/
|
|
428
582
|
concurrency?: number | boolean | undefined;
|
|
429
|
-
|
|
430
583
|
/**
|
|
431
584
|
* If truthy, and the test context is configured to run `only` tests, then this test will be
|
|
432
585
|
* run. Otherwise, the test is skipped.
|
|
433
586
|
* @default false
|
|
434
587
|
*/
|
|
435
588
|
only?: boolean | undefined;
|
|
436
|
-
|
|
437
589
|
/**
|
|
438
590
|
* Allows aborting an in-progress test.
|
|
439
591
|
* @since v18.8.0
|
|
440
592
|
*/
|
|
441
593
|
signal?: AbortSignal | undefined;
|
|
442
|
-
|
|
443
594
|
/**
|
|
444
595
|
* If truthy, the test is skipped. If a string is provided, that string is displayed in the
|
|
445
596
|
* test results as the reason for skipping the test.
|
|
446
597
|
* @default false
|
|
447
598
|
*/
|
|
448
599
|
skip?: boolean | string | undefined;
|
|
449
|
-
|
|
450
600
|
/**
|
|
451
601
|
* A number of milliseconds the test will fail after. If unspecified, subtests inherit this
|
|
452
602
|
* value from their parent.
|
|
@@ -454,7 +604,6 @@ declare module 'node:test' {
|
|
|
454
604
|
* @since v18.7.0
|
|
455
605
|
*/
|
|
456
606
|
timeout?: number | undefined;
|
|
457
|
-
|
|
458
607
|
/**
|
|
459
608
|
* If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in
|
|
460
609
|
* the test results as the reason why the test is `TODO`.
|
|
@@ -462,49 +611,77 @@ declare module 'node:test' {
|
|
|
462
611
|
*/
|
|
463
612
|
todo?: boolean | string | undefined;
|
|
464
613
|
}
|
|
465
|
-
|
|
466
614
|
/**
|
|
467
615
|
* This function is used to create a hook running before running a suite.
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
616
|
+
*
|
|
617
|
+
* ```js
|
|
618
|
+
* describe('tests', async () => {
|
|
619
|
+
* before(() => console.log('about to run some test'));
|
|
620
|
+
* it('is a subtest', () => {
|
|
621
|
+
* assert.ok('some relevant assertion here');
|
|
622
|
+
* });
|
|
623
|
+
* });
|
|
624
|
+
* ```
|
|
625
|
+
* @since v18.8.0, v16.18.0
|
|
626
|
+
* @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
|
|
627
|
+
* @param options Configuration options for the hook. The following properties are supported:
|
|
472
628
|
*/
|
|
473
629
|
function before(fn?: HookFn, options?: HookOptions): void;
|
|
474
|
-
|
|
475
630
|
/**
|
|
476
|
-
* This function is used to create a hook running after
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
631
|
+
* This function is used to create a hook running after running a suite.
|
|
632
|
+
*
|
|
633
|
+
* ```js
|
|
634
|
+
* describe('tests', async () => {
|
|
635
|
+
* after(() => console.log('finished running tests'));
|
|
636
|
+
* it('is a subtest', () => {
|
|
637
|
+
* assert.ok('some relevant assertion here');
|
|
638
|
+
* });
|
|
639
|
+
* });
|
|
640
|
+
* ```
|
|
641
|
+
* @since v18.8.0, v16.18.0
|
|
642
|
+
* @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
|
|
643
|
+
* @param options Configuration options for the hook. The following properties are supported:
|
|
481
644
|
*/
|
|
482
645
|
function after(fn?: HookFn, options?: HookOptions): void;
|
|
483
|
-
|
|
484
646
|
/**
|
|
485
|
-
* This function is used to create a hook running
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
647
|
+
* This function is used to create a hook running
|
|
648
|
+
* before each subtest of the current suite.
|
|
649
|
+
*
|
|
650
|
+
* ```js
|
|
651
|
+
* describe('tests', async () => {
|
|
652
|
+
* beforeEach(() => console.log('about to run a test'));
|
|
653
|
+
* it('is a subtest', () => {
|
|
654
|
+
* assert.ok('some relevant assertion here');
|
|
655
|
+
* });
|
|
656
|
+
* });
|
|
657
|
+
* ```
|
|
658
|
+
* @since v18.8.0, v16.18.0
|
|
659
|
+
* @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
|
|
660
|
+
* @param options Configuration options for the hook. The following properties are supported:
|
|
490
661
|
*/
|
|
491
662
|
function beforeEach(fn?: HookFn, options?: HookOptions): void;
|
|
492
|
-
|
|
493
663
|
/**
|
|
494
|
-
* This function is used to create a hook running
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
*
|
|
664
|
+
* This function is used to create a hook running
|
|
665
|
+
* after each subtest of the current test.
|
|
666
|
+
*
|
|
667
|
+
* ```js
|
|
668
|
+
* describe('tests', async () => {
|
|
669
|
+
* afterEach(() => console.log('finished running a test'));
|
|
670
|
+
* it('is a subtest', () => {
|
|
671
|
+
* assert.ok('some relevant assertion here');
|
|
672
|
+
* });
|
|
673
|
+
* });
|
|
674
|
+
* ```
|
|
675
|
+
* @since v18.8.0, v16.18.0
|
|
676
|
+
* @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
|
|
677
|
+
* @param options Configuration options for the hook. The following properties are supported:
|
|
499
678
|
*/
|
|
500
679
|
function afterEach(fn?: HookFn, options?: HookOptions): void;
|
|
501
|
-
|
|
502
680
|
/**
|
|
503
681
|
* The hook function. If the hook uses callbacks, the callback function is passed as the
|
|
504
682
|
* second argument.
|
|
505
683
|
*/
|
|
506
684
|
type HookFn = (done: (result?: any) => void) => any;
|
|
507
|
-
|
|
508
685
|
/**
|
|
509
686
|
* Configuration options for hooks.
|
|
510
687
|
* @since v18.8.0
|
|
@@ -514,7 +691,6 @@ declare module 'node:test' {
|
|
|
514
691
|
* Allows aborting an in-progress hook.
|
|
515
692
|
*/
|
|
516
693
|
signal?: AbortSignal | undefined;
|
|
517
|
-
|
|
518
694
|
/**
|
|
519
695
|
* A number of milliseconds the hook will fail after. If unspecified, subtests inherit this
|
|
520
696
|
* value from their parent.
|
|
@@ -522,7 +698,6 @@ declare module 'node:test' {
|
|
|
522
698
|
*/
|
|
523
699
|
timeout?: number | undefined;
|
|
524
700
|
}
|
|
525
|
-
|
|
526
701
|
interface MockFunctionOptions {
|
|
527
702
|
/**
|
|
528
703
|
* The number of times that the mock will use the behavior of `implementation`.
|
|
@@ -533,48 +708,106 @@ declare module 'node:test' {
|
|
|
533
708
|
*/
|
|
534
709
|
times?: number | undefined;
|
|
535
710
|
}
|
|
536
|
-
|
|
537
711
|
interface MockMethodOptions extends MockFunctionOptions {
|
|
538
712
|
/**
|
|
539
713
|
* If `true`, `object[methodName]` is treated as a getter.
|
|
540
714
|
* This option cannot be used with the `setter` option.
|
|
541
715
|
*/
|
|
542
716
|
getter?: boolean | undefined;
|
|
543
|
-
|
|
544
717
|
/**
|
|
545
718
|
* If `true`, `object[methodName]` is treated as a setter.
|
|
546
719
|
* This option cannot be used with the `getter` option.
|
|
547
720
|
*/
|
|
548
721
|
setter?: boolean | undefined;
|
|
549
722
|
}
|
|
550
|
-
|
|
551
723
|
type Mock<F extends Function> = F & {
|
|
552
724
|
mock: MockFunctionContext<F>;
|
|
553
725
|
};
|
|
554
|
-
|
|
555
726
|
type NoOpFunction = (...args: any[]) => undefined;
|
|
556
|
-
|
|
557
727
|
type FunctionPropertyNames<T> = {
|
|
558
728
|
[K in keyof T]: T[K] extends Function ? K : never;
|
|
559
729
|
}[keyof T];
|
|
560
|
-
|
|
561
|
-
|
|
730
|
+
/**
|
|
731
|
+
* The `MockTracker` class is used to manage mocking functionality. The test runner
|
|
732
|
+
* module provides a top level `mock` export which is a `MockTracker` instance.
|
|
733
|
+
* Each test also provides its own `MockTracker` instance via the test context's`mock` property.
|
|
734
|
+
* @since v19.1.0, v18.13.0
|
|
735
|
+
*/
|
|
736
|
+
class MockTracker {
|
|
562
737
|
/**
|
|
563
738
|
* This function is used to create a mock function.
|
|
564
|
-
*
|
|
565
|
-
*
|
|
566
|
-
*
|
|
567
|
-
*
|
|
739
|
+
*
|
|
740
|
+
* The following example creates a mock function that increments a counter by one
|
|
741
|
+
* on each invocation. The `times` option is used to modify the mock behavior such
|
|
742
|
+
* that the first two invocations add two to the counter instead of one.
|
|
743
|
+
*
|
|
744
|
+
* ```js
|
|
745
|
+
* test('mocks a counting function', (t) => {
|
|
746
|
+
* let cnt = 0;
|
|
747
|
+
*
|
|
748
|
+
* function addOne() {
|
|
749
|
+
* cnt++;
|
|
750
|
+
* return cnt;
|
|
751
|
+
* }
|
|
752
|
+
*
|
|
753
|
+
* function addTwo() {
|
|
754
|
+
* cnt += 2;
|
|
755
|
+
* return cnt;
|
|
756
|
+
* }
|
|
757
|
+
*
|
|
758
|
+
* const fn = t.mock.fn(addOne, addTwo, { times: 2 });
|
|
759
|
+
*
|
|
760
|
+
* assert.strictEqual(fn(), 2);
|
|
761
|
+
* assert.strictEqual(fn(), 4);
|
|
762
|
+
* assert.strictEqual(fn(), 5);
|
|
763
|
+
* assert.strictEqual(fn(), 6);
|
|
764
|
+
* });
|
|
765
|
+
* ```
|
|
766
|
+
* @since v19.1.0, v18.13.0
|
|
767
|
+
* @param [original='A no-op function'] An optional function to create a mock on.
|
|
768
|
+
* @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and
|
|
769
|
+
* then restore the behavior of `original`.
|
|
770
|
+
* @param options Optional configuration options for the mock function. The following properties are supported:
|
|
771
|
+
* @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the
|
|
772
|
+
* behavior of the mocked function.
|
|
568
773
|
*/
|
|
569
774
|
fn<F extends Function = NoOpFunction>(original?: F, options?: MockFunctionOptions): Mock<F>;
|
|
570
775
|
fn<F extends Function = NoOpFunction, Implementation extends Function = F>(original?: F, implementation?: Implementation, options?: MockFunctionOptions): Mock<F | Implementation>;
|
|
571
|
-
|
|
572
776
|
/**
|
|
573
|
-
* This function is used to create a mock on an existing object method.
|
|
777
|
+
* This function is used to create a mock on an existing object method. The
|
|
778
|
+
* following example demonstrates how a mock is created on an existing object
|
|
779
|
+
* method.
|
|
780
|
+
*
|
|
781
|
+
* ```js
|
|
782
|
+
* test('spies on an object method', (t) => {
|
|
783
|
+
* const number = {
|
|
784
|
+
* value: 5,
|
|
785
|
+
* subtract(a) {
|
|
786
|
+
* return this.value - a;
|
|
787
|
+
* },
|
|
788
|
+
* };
|
|
789
|
+
*
|
|
790
|
+
* t.mock.method(number, 'subtract');
|
|
791
|
+
* assert.strictEqual(number.subtract.mock.calls.length, 0);
|
|
792
|
+
* assert.strictEqual(number.subtract(3), 2);
|
|
793
|
+
* assert.strictEqual(number.subtract.mock.calls.length, 1);
|
|
794
|
+
*
|
|
795
|
+
* const call = number.subtract.mock.calls[0];
|
|
796
|
+
*
|
|
797
|
+
* assert.deepStrictEqual(call.arguments, [3]);
|
|
798
|
+
* assert.strictEqual(call.result, 2);
|
|
799
|
+
* assert.strictEqual(call.error, undefined);
|
|
800
|
+
* assert.strictEqual(call.target, undefined);
|
|
801
|
+
* assert.strictEqual(call.this, number);
|
|
802
|
+
* });
|
|
803
|
+
* ```
|
|
804
|
+
* @since v19.1.0, v18.13.0
|
|
574
805
|
* @param object The object whose method is being mocked.
|
|
575
806
|
* @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown.
|
|
576
807
|
* @param implementation An optional function used as the mock implementation for `object[methodName]`.
|
|
577
|
-
* @param options Optional configuration options for the mock method.
|
|
808
|
+
* @param options Optional configuration options for the mock method. The following properties are supported:
|
|
809
|
+
* @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the
|
|
810
|
+
* behavior of the mocked method.
|
|
578
811
|
*/
|
|
579
812
|
method<
|
|
580
813
|
MockedObject extends object,
|
|
@@ -611,7 +844,8 @@ declare module 'node:test' {
|
|
|
611
844
|
): Mock<Function>;
|
|
612
845
|
|
|
613
846
|
/**
|
|
614
|
-
* This function is syntax sugar for
|
|
847
|
+
* This function is syntax sugar for `MockTracker.method` with `options.getter`set to `true`.
|
|
848
|
+
* @since v19.3.0, v18.13.0
|
|
615
849
|
*/
|
|
616
850
|
getter<
|
|
617
851
|
MockedObject extends object,
|
|
@@ -631,9 +865,9 @@ declare module 'node:test' {
|
|
|
631
865
|
implementation?: Implementation,
|
|
632
866
|
options?: MockFunctionOptions,
|
|
633
867
|
): Mock<(() => MockedObject[MethodName]) | Implementation>;
|
|
634
|
-
|
|
635
868
|
/**
|
|
636
|
-
* This function is syntax sugar for
|
|
869
|
+
* This function is syntax sugar for `MockTracker.method` with `options.setter`set to `true`.
|
|
870
|
+
* @since v19.3.0, v18.13.0
|
|
637
871
|
*/
|
|
638
872
|
setter<
|
|
639
873
|
MockedObject extends object,
|
|
@@ -653,26 +887,26 @@ declare module 'node:test' {
|
|
|
653
887
|
implementation?: Implementation,
|
|
654
888
|
options?: MockFunctionOptions,
|
|
655
889
|
): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
|
|
656
|
-
|
|
657
890
|
/**
|
|
658
|
-
* This function restores the default behavior of all mocks that were previously
|
|
659
|
-
* and disassociates the mocks from the
|
|
660
|
-
*
|
|
891
|
+
* This function restores the default behavior of all mocks that were previously
|
|
892
|
+
* created by this `MockTracker` and disassociates the mocks from the`MockTracker` instance. Once disassociated, the mocks can still be used, but the`MockTracker` instance can no longer be
|
|
893
|
+
* used to reset their behavior or
|
|
894
|
+
* otherwise interact with them.
|
|
661
895
|
*
|
|
662
|
-
* After each test completes, this function is called on the test context's `MockTracker
|
|
663
|
-
*
|
|
896
|
+
* After each test completes, this function is called on the test context's`MockTracker`. If the global `MockTracker` is used extensively, calling this
|
|
897
|
+
* function manually is recommended.
|
|
898
|
+
* @since v19.1.0, v18.13.0
|
|
664
899
|
*/
|
|
665
900
|
reset(): void;
|
|
666
|
-
|
|
667
901
|
/**
|
|
668
|
-
* This function restores the default behavior of all mocks that were previously
|
|
669
|
-
* Unlike `mock.reset()`, `mock.restoreAll()` does
|
|
902
|
+
* This function restores the default behavior of all mocks that were previously
|
|
903
|
+
* created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does
|
|
904
|
+
* not disassociate the mocks from the `MockTracker` instance.
|
|
905
|
+
* @since v19.1.0, v18.13.0
|
|
670
906
|
*/
|
|
671
907
|
restoreAll(): void;
|
|
672
908
|
}
|
|
673
|
-
|
|
674
909
|
const mock: MockTracker;
|
|
675
|
-
|
|
676
910
|
interface MockFunctionCall<
|
|
677
911
|
F extends Function,
|
|
678
912
|
ReturnType = F extends (...args: any) => infer T
|
|
@@ -714,47 +948,105 @@ declare module 'node:test' {
|
|
|
714
948
|
*/
|
|
715
949
|
this: unknown;
|
|
716
950
|
}
|
|
717
|
-
|
|
718
|
-
|
|
951
|
+
/**
|
|
952
|
+
* The `MockFunctionContext` class is used to inspect or manipulate the behavior of
|
|
953
|
+
* mocks created via the `MockTracker` APIs.
|
|
954
|
+
* @since v19.1.0, v18.13.0
|
|
955
|
+
*/
|
|
956
|
+
class MockFunctionContext<F extends Function> {
|
|
719
957
|
/**
|
|
720
|
-
* A getter that returns a copy of the internal array used to track calls to the
|
|
958
|
+
* A getter that returns a copy of the internal array used to track calls to the
|
|
959
|
+
* mock. Each entry in the array is an object with the following properties.
|
|
960
|
+
* @since v19.1.0, v18.13.0
|
|
721
961
|
*/
|
|
722
962
|
readonly calls: Array<MockFunctionCall<F>>;
|
|
723
|
-
|
|
724
963
|
/**
|
|
725
|
-
* This function returns the number of times that this mock has been invoked.
|
|
726
|
-
*
|
|
727
|
-
*
|
|
964
|
+
* This function returns the number of times that this mock has been invoked. This
|
|
965
|
+
* function is more efficient than checking `ctx.calls.length` because `ctx.calls`is a getter that creates a copy of the internal call tracking array.
|
|
966
|
+
* @since v19.1.0, v18.13.0
|
|
967
|
+
* @return The number of times that this mock has been invoked.
|
|
728
968
|
*/
|
|
729
969
|
callCount(): number;
|
|
730
|
-
|
|
731
970
|
/**
|
|
732
971
|
* This function is used to change the behavior of an existing mock.
|
|
972
|
+
*
|
|
973
|
+
* The following example creates a mock function using `t.mock.fn()`, calls the
|
|
974
|
+
* mock function, and then changes the mock implementation to a different function.
|
|
975
|
+
*
|
|
976
|
+
* ```js
|
|
977
|
+
* test('changes a mock behavior', (t) => {
|
|
978
|
+
* let cnt = 0;
|
|
979
|
+
*
|
|
980
|
+
* function addOne() {
|
|
981
|
+
* cnt++;
|
|
982
|
+
* return cnt;
|
|
983
|
+
* }
|
|
984
|
+
*
|
|
985
|
+
* function addTwo() {
|
|
986
|
+
* cnt += 2;
|
|
987
|
+
* return cnt;
|
|
988
|
+
* }
|
|
989
|
+
*
|
|
990
|
+
* const fn = t.mock.fn(addOne);
|
|
991
|
+
*
|
|
992
|
+
* assert.strictEqual(fn(), 1);
|
|
993
|
+
* fn.mock.mockImplementation(addTwo);
|
|
994
|
+
* assert.strictEqual(fn(), 3);
|
|
995
|
+
* assert.strictEqual(fn(), 5);
|
|
996
|
+
* });
|
|
997
|
+
* ```
|
|
998
|
+
* @since v19.1.0, v18.13.0
|
|
733
999
|
* @param implementation The function to be used as the mock's new implementation.
|
|
734
1000
|
*/
|
|
735
1001
|
mockImplementation(implementation: Function): void;
|
|
736
|
-
|
|
737
1002
|
/**
|
|
738
|
-
* This function is used to change the behavior of an existing mock for a single
|
|
739
|
-
* Once invocation `onCall` has occurred, the mock will revert to
|
|
740
|
-
* it would have used had `mockImplementationOnce()` not been
|
|
1003
|
+
* This function is used to change the behavior of an existing mock for a single
|
|
1004
|
+
* invocation. Once invocation `onCall` has occurred, the mock will revert to
|
|
1005
|
+
* whatever behavior it would have used had `mockImplementationOnce()` not been
|
|
1006
|
+
* called.
|
|
1007
|
+
*
|
|
1008
|
+
* The following example creates a mock function using `t.mock.fn()`, calls the
|
|
1009
|
+
* mock function, changes the mock implementation to a different function for the
|
|
1010
|
+
* next invocation, and then resumes its previous behavior.
|
|
1011
|
+
*
|
|
1012
|
+
* ```js
|
|
1013
|
+
* test('changes a mock behavior once', (t) => {
|
|
1014
|
+
* let cnt = 0;
|
|
1015
|
+
*
|
|
1016
|
+
* function addOne() {
|
|
1017
|
+
* cnt++;
|
|
1018
|
+
* return cnt;
|
|
1019
|
+
* }
|
|
1020
|
+
*
|
|
1021
|
+
* function addTwo() {
|
|
1022
|
+
* cnt += 2;
|
|
1023
|
+
* return cnt;
|
|
1024
|
+
* }
|
|
1025
|
+
*
|
|
1026
|
+
* const fn = t.mock.fn(addOne);
|
|
1027
|
+
*
|
|
1028
|
+
* assert.strictEqual(fn(), 1);
|
|
1029
|
+
* fn.mock.mockImplementationOnce(addTwo);
|
|
1030
|
+
* assert.strictEqual(fn(), 3);
|
|
1031
|
+
* assert.strictEqual(fn(), 4);
|
|
1032
|
+
* });
|
|
1033
|
+
* ```
|
|
1034
|
+
* @since v19.1.0, v18.13.0
|
|
741
1035
|
* @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`.
|
|
742
|
-
* @param onCall The invocation number that will use `implementation`.
|
|
743
|
-
* If the specified invocation has already occurred then an exception is thrown.
|
|
1036
|
+
* @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown.
|
|
744
1037
|
*/
|
|
745
1038
|
mockImplementationOnce(implementation: Function, onCall?: number): void;
|
|
746
|
-
|
|
747
1039
|
/**
|
|
748
1040
|
* Resets the call history of the mock function.
|
|
1041
|
+
* @since v19.3.0, v18.13.0
|
|
749
1042
|
*/
|
|
750
1043
|
resetCalls(): void;
|
|
751
|
-
|
|
752
1044
|
/**
|
|
753
|
-
* Resets the implementation of the mock function to its original behavior.
|
|
754
|
-
*
|
|
1045
|
+
* Resets the implementation of the mock function to its original behavior. The
|
|
1046
|
+
* mock can still be used after calling this function.
|
|
1047
|
+
* @since v19.1.0, v18.13.0
|
|
755
1048
|
*/
|
|
756
1049
|
restore(): void;
|
|
757
1050
|
}
|
|
758
|
-
|
|
759
|
-
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock };
|
|
1051
|
+
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock, skip, only, todo };
|
|
760
1052
|
}
|