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.
Files changed (599) hide show
  1. package/.gitattributes +1 -0
  2. package/.jsii +3 -3
  3. package/lib/codecommit-mirror/index.js +2 -2
  4. package/lib/dmarc/index.js +1 -1
  5. package/lib/ecs-service-roller/index.js +2 -2
  6. package/lib/email-receiver/receiver.js +1 -1
  7. package/lib/saml-identity-provider/index.js +2 -2
  8. package/lib/slack-app/manifest.js +1 -1
  9. package/lib/slack-app/slack-app.js +2 -2
  10. package/lib/slack-events/index.js +1 -1
  11. package/lib/slack-textract/index.js +1 -1
  12. package/lib/ssl-server-test/index.js +1 -1
  13. package/lib/state-machine-cr-provider/index.js +1 -1
  14. package/lib/static-website/index.js +1 -1
  15. package/lib/toolkit-cleaner/index.js +1 -1
  16. package/lib/url-shortener/index.js +1 -1
  17. package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
  18. package/node_modules/@slack/logger/node_modules/@types/node/assert.d.ts +86 -75
  19. package/node_modules/@slack/logger/node_modules/@types/node/async_hooks.d.ts +66 -49
  20. package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +136 -97
  21. package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +81 -55
  22. package/node_modules/@slack/logger/node_modules/@types/node/cluster.d.ts +12 -12
  23. package/node_modules/@slack/logger/node_modules/@types/node/console.d.ts +5 -5
  24. package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +210 -221
  25. package/node_modules/@slack/logger/node_modules/@types/node/dgram.d.ts +15 -15
  26. package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
  27. package/node_modules/@slack/logger/node_modules/@types/node/dns/promises.d.ts +50 -6
  28. package/node_modules/@slack/logger/node_modules/@types/node/dns.d.ts +25 -16
  29. package/node_modules/@slack/logger/node_modules/@types/node/domain.d.ts +4 -4
  30. package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +111 -65
  31. package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +80 -49
  32. package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +162 -91
  33. package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +3 -1
  34. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +195 -129
  35. package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +42 -46
  36. package/node_modules/@slack/logger/node_modules/@types/node/https.d.ts +52 -153
  37. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +1 -1
  38. package/node_modules/@slack/logger/node_modules/@types/node/inspector.d.ts +10 -3
  39. package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +5 -4
  40. package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +21 -18
  41. package/node_modules/@slack/logger/node_modules/@types/node/os.d.ts +22 -18
  42. package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -2
  43. package/node_modules/@slack/logger/node_modules/@types/node/path.d.ts +4 -4
  44. package/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +28 -15
  45. package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +43 -46
  46. package/node_modules/@slack/logger/node_modules/@types/node/punycode.d.ts +1 -1
  47. package/node_modules/@slack/logger/node_modules/@types/node/querystring.d.ts +5 -5
  48. package/node_modules/@slack/logger/node_modules/@types/node/readline/promises.d.ts +65 -63
  49. package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +32 -159
  50. package/node_modules/@slack/logger/node_modules/@types/node/repl.d.ts +20 -20
  51. package/node_modules/@slack/logger/node_modules/@types/node/stream/consumers.d.ts +1 -1
  52. package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +839 -857
  53. package/node_modules/@slack/logger/node_modules/@types/node/string_decoder.d.ts +6 -6
  54. package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +498 -206
  55. package/node_modules/@slack/logger/node_modules/@types/node/timers/promises.d.ts +3 -3
  56. package/node_modules/@slack/logger/node_modules/@types/node/timers.d.ts +122 -8
  57. package/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +34 -22
  58. package/node_modules/@slack/logger/node_modules/@types/node/trace_events.d.ts +20 -9
  59. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
  60. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
  61. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
  62. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
  63. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
  64. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/console.d.ts +5 -5
  65. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
  66. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
  67. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
  68. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
  69. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
  70. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
  71. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/events.d.ts +111 -65
  72. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
  73. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
  74. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
  75. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/http.d.ts +202 -129
  76. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
  77. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/https.d.ts +52 -153
  78. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
  79. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/module.d.ts +5 -4
  80. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/net.d.ts +24 -21
  81. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/os.d.ts +22 -18
  82. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/path.d.ts +4 -4
  83. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
  84. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/process.d.ts +43 -46
  85. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
  86. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
  87. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
  88. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
  89. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
  90. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
  91. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
  92. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
  93. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/test.d.ts +498 -206
  94. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
  95. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
  96. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
  97. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
  98. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
  99. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/url.d.ts +46 -42
  100. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/util.d.ts +150 -109
  101. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
  102. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
  103. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
  104. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
  105. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
  106. package/node_modules/@slack/logger/node_modules/@types/node/tty.d.ts +4 -5
  107. package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +46 -42
  108. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +150 -109
  109. package/node_modules/@slack/logger/node_modules/@types/node/v8.d.ts +204 -16
  110. package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +292 -42
  111. package/node_modules/@slack/logger/node_modules/@types/node/wasi.d.ts +13 -19
  112. package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +38 -34
  113. package/node_modules/@slack/logger/node_modules/@types/node/zlib.d.ts +11 -11
  114. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  115. package/node_modules/@slack/web-api/node_modules/@types/node/assert.d.ts +86 -75
  116. package/node_modules/@slack/web-api/node_modules/@types/node/async_hooks.d.ts +66 -49
  117. package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +136 -97
  118. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +81 -55
  119. package/node_modules/@slack/web-api/node_modules/@types/node/cluster.d.ts +12 -12
  120. package/node_modules/@slack/web-api/node_modules/@types/node/console.d.ts +5 -5
  121. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +210 -221
  122. package/node_modules/@slack/web-api/node_modules/@types/node/dgram.d.ts +15 -15
  123. package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
  124. package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +50 -6
  125. package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +25 -16
  126. package/node_modules/@slack/web-api/node_modules/@types/node/domain.d.ts +4 -4
  127. package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +111 -65
  128. package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +80 -49
  129. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +162 -91
  130. package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +3 -1
  131. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +195 -129
  132. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +42 -46
  133. package/node_modules/@slack/web-api/node_modules/@types/node/https.d.ts +52 -153
  134. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +1 -1
  135. package/node_modules/@slack/web-api/node_modules/@types/node/inspector.d.ts +10 -3
  136. package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +5 -4
  137. package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +21 -18
  138. package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +22 -18
  139. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  140. package/node_modules/@slack/web-api/node_modules/@types/node/path.d.ts +4 -4
  141. package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +28 -15
  142. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +43 -46
  143. package/node_modules/@slack/web-api/node_modules/@types/node/punycode.d.ts +1 -1
  144. package/node_modules/@slack/web-api/node_modules/@types/node/querystring.d.ts +5 -5
  145. package/node_modules/@slack/web-api/node_modules/@types/node/readline/promises.d.ts +65 -63
  146. package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +32 -159
  147. package/node_modules/@slack/web-api/node_modules/@types/node/repl.d.ts +20 -20
  148. package/node_modules/@slack/web-api/node_modules/@types/node/stream/consumers.d.ts +1 -1
  149. package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +839 -857
  150. package/node_modules/@slack/web-api/node_modules/@types/node/string_decoder.d.ts +6 -6
  151. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +498 -206
  152. package/node_modules/@slack/web-api/node_modules/@types/node/timers/promises.d.ts +3 -3
  153. package/node_modules/@slack/web-api/node_modules/@types/node/timers.d.ts +122 -8
  154. package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +34 -22
  155. package/node_modules/@slack/web-api/node_modules/@types/node/trace_events.d.ts +20 -9
  156. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
  157. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
  158. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
  159. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
  160. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
  161. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/console.d.ts +5 -5
  162. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
  163. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
  164. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
  165. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
  166. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
  167. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
  168. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/events.d.ts +111 -65
  169. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
  170. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
  171. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
  172. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/http.d.ts +202 -129
  173. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
  174. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/https.d.ts +52 -153
  175. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
  176. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/module.d.ts +5 -4
  177. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/net.d.ts +24 -21
  178. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/os.d.ts +22 -18
  179. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/path.d.ts +4 -4
  180. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
  181. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/process.d.ts +43 -46
  182. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
  183. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
  184. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
  185. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
  186. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
  187. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
  188. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
  189. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
  190. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/test.d.ts +498 -206
  191. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
  192. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
  193. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
  194. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
  195. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
  196. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/url.d.ts +46 -42
  197. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/util.d.ts +150 -109
  198. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
  199. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
  200. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
  201. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
  202. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
  203. package/node_modules/@slack/web-api/node_modules/@types/node/tty.d.ts +4 -5
  204. package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +46 -42
  205. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +150 -109
  206. package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +204 -16
  207. package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +292 -42
  208. package/node_modules/@slack/web-api/node_modules/@types/node/wasi.d.ts +13 -19
  209. package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +38 -34
  210. package/node_modules/@slack/web-api/node_modules/@types/node/zlib.d.ts +11 -11
  211. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  212. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +86 -75
  213. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +66 -49
  214. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +136 -97
  215. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +81 -55
  216. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +12 -12
  217. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +5 -5
  218. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +210 -221
  219. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +15 -15
  220. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
  221. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +50 -6
  222. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +25 -16
  223. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +4 -4
  224. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +111 -65
  225. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +80 -49
  226. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +162 -91
  227. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +3 -1
  228. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +195 -129
  229. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +42 -46
  230. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +52 -153
  231. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +1 -1
  232. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +10 -3
  233. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +5 -4
  234. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +21 -18
  235. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +22 -18
  236. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
  237. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +4 -4
  238. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +28 -15
  239. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +43 -46
  240. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +1 -1
  241. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +5 -5
  242. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +65 -63
  243. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +32 -159
  244. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +20 -20
  245. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +1 -1
  246. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +839 -857
  247. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +6 -6
  248. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +498 -206
  249. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +3 -3
  250. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +122 -8
  251. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +34 -22
  252. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +20 -9
  253. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
  254. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
  255. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
  256. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
  257. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
  258. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/console.d.ts +5 -5
  259. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
  260. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
  261. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
  262. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
  263. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
  264. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
  265. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/events.d.ts +111 -65
  266. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
  267. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
  268. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
  269. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +202 -129
  270. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
  271. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +52 -153
  272. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
  273. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +5 -4
  274. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +24 -21
  275. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/os.d.ts +22 -18
  276. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/path.d.ts +4 -4
  277. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
  278. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/process.d.ts +43 -46
  279. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
  280. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
  281. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
  282. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
  283. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
  284. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
  285. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
  286. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
  287. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +498 -206
  288. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
  289. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
  290. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
  291. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
  292. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
  293. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/url.d.ts +46 -42
  294. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +150 -109
  295. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
  296. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
  297. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
  298. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
  299. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
  300. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +4 -5
  301. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +46 -42
  302. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +150 -109
  303. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +204 -16
  304. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +292 -42
  305. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +13 -19
  306. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +38 -34
  307. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +11 -11
  308. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +1 -1
  309. package/node_modules/@types/is-stream/node_modules/@types/node/assert.d.ts +86 -75
  310. package/node_modules/@types/is-stream/node_modules/@types/node/async_hooks.d.ts +66 -49
  311. package/node_modules/@types/is-stream/node_modules/@types/node/buffer.d.ts +136 -97
  312. package/node_modules/@types/is-stream/node_modules/@types/node/child_process.d.ts +81 -55
  313. package/node_modules/@types/is-stream/node_modules/@types/node/cluster.d.ts +12 -12
  314. package/node_modules/@types/is-stream/node_modules/@types/node/console.d.ts +5 -5
  315. package/node_modules/@types/is-stream/node_modules/@types/node/crypto.d.ts +210 -221
  316. package/node_modules/@types/is-stream/node_modules/@types/node/dgram.d.ts +15 -15
  317. package/node_modules/@types/is-stream/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
  318. package/node_modules/@types/is-stream/node_modules/@types/node/dns/promises.d.ts +50 -6
  319. package/node_modules/@types/is-stream/node_modules/@types/node/dns.d.ts +25 -16
  320. package/node_modules/@types/is-stream/node_modules/@types/node/domain.d.ts +4 -4
  321. package/node_modules/@types/is-stream/node_modules/@types/node/events.d.ts +111 -65
  322. package/node_modules/@types/is-stream/node_modules/@types/node/fs/promises.d.ts +80 -49
  323. package/node_modules/@types/is-stream/node_modules/@types/node/fs.d.ts +162 -91
  324. package/node_modules/@types/is-stream/node_modules/@types/node/globals.d.ts +3 -1
  325. package/node_modules/@types/is-stream/node_modules/@types/node/http.d.ts +195 -129
  326. package/node_modules/@types/is-stream/node_modules/@types/node/http2.d.ts +42 -46
  327. package/node_modules/@types/is-stream/node_modules/@types/node/https.d.ts +52 -153
  328. package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +1 -1
  329. package/node_modules/@types/is-stream/node_modules/@types/node/inspector.d.ts +10 -3
  330. package/node_modules/@types/is-stream/node_modules/@types/node/module.d.ts +5 -4
  331. package/node_modules/@types/is-stream/node_modules/@types/node/net.d.ts +21 -18
  332. package/node_modules/@types/is-stream/node_modules/@types/node/os.d.ts +22 -18
  333. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +2 -2
  334. package/node_modules/@types/is-stream/node_modules/@types/node/path.d.ts +4 -4
  335. package/node_modules/@types/is-stream/node_modules/@types/node/perf_hooks.d.ts +28 -15
  336. package/node_modules/@types/is-stream/node_modules/@types/node/process.d.ts +43 -46
  337. package/node_modules/@types/is-stream/node_modules/@types/node/punycode.d.ts +1 -1
  338. package/node_modules/@types/is-stream/node_modules/@types/node/querystring.d.ts +5 -5
  339. package/node_modules/@types/is-stream/node_modules/@types/node/readline/promises.d.ts +65 -63
  340. package/node_modules/@types/is-stream/node_modules/@types/node/readline.d.ts +32 -159
  341. package/node_modules/@types/is-stream/node_modules/@types/node/repl.d.ts +20 -20
  342. package/node_modules/@types/is-stream/node_modules/@types/node/stream/consumers.d.ts +1 -1
  343. package/node_modules/@types/is-stream/node_modules/@types/node/stream.d.ts +839 -857
  344. package/node_modules/@types/is-stream/node_modules/@types/node/string_decoder.d.ts +6 -6
  345. package/node_modules/@types/is-stream/node_modules/@types/node/test.d.ts +498 -206
  346. package/node_modules/@types/is-stream/node_modules/@types/node/timers/promises.d.ts +3 -3
  347. package/node_modules/@types/is-stream/node_modules/@types/node/timers.d.ts +122 -8
  348. package/node_modules/@types/is-stream/node_modules/@types/node/tls.d.ts +34 -22
  349. package/node_modules/@types/is-stream/node_modules/@types/node/trace_events.d.ts +20 -9
  350. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
  351. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
  352. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
  353. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
  354. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
  355. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/console.d.ts +5 -5
  356. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
  357. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
  358. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
  359. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
  360. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
  361. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
  362. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/events.d.ts +111 -65
  363. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
  364. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
  365. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
  366. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/http.d.ts +202 -129
  367. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
  368. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/https.d.ts +52 -153
  369. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
  370. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/module.d.ts +5 -4
  371. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/net.d.ts +24 -21
  372. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/os.d.ts +22 -18
  373. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/path.d.ts +4 -4
  374. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
  375. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/process.d.ts +43 -46
  376. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
  377. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
  378. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
  379. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
  380. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
  381. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
  382. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
  383. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
  384. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/test.d.ts +498 -206
  385. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
  386. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
  387. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
  388. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
  389. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
  390. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/url.d.ts +46 -42
  391. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/util.d.ts +150 -109
  392. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
  393. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
  394. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
  395. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
  396. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
  397. package/node_modules/@types/is-stream/node_modules/@types/node/tty.d.ts +4 -5
  398. package/node_modules/@types/is-stream/node_modules/@types/node/url.d.ts +46 -42
  399. package/node_modules/@types/is-stream/node_modules/@types/node/util.d.ts +150 -109
  400. package/node_modules/@types/is-stream/node_modules/@types/node/v8.d.ts +204 -16
  401. package/node_modules/@types/is-stream/node_modules/@types/node/vm.d.ts +292 -42
  402. package/node_modules/@types/is-stream/node_modules/@types/node/wasi.d.ts +13 -19
  403. package/node_modules/@types/is-stream/node_modules/@types/node/worker_threads.d.ts +38 -34
  404. package/node_modules/@types/is-stream/node_modules/@types/node/zlib.d.ts +11 -11
  405. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  406. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +86 -75
  407. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +66 -49
  408. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +136 -97
  409. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +81 -55
  410. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +12 -12
  411. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +5 -5
  412. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +210 -221
  413. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +15 -15
  414. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
  415. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +50 -6
  416. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +25 -16
  417. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +4 -4
  418. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +111 -65
  419. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +80 -49
  420. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +162 -91
  421. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +3 -1
  422. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +195 -129
  423. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +42 -46
  424. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +52 -153
  425. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +1 -1
  426. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +10 -3
  427. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +5 -4
  428. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +21 -18
  429. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +22 -18
  430. package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
  431. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +4 -4
  432. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +28 -15
  433. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +43 -46
  434. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +1 -1
  435. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +5 -5
  436. package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +65 -63
  437. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +32 -159
  438. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +20 -20
  439. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +1 -1
  440. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +839 -857
  441. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +6 -6
  442. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +498 -206
  443. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +3 -3
  444. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +122 -8
  445. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +34 -22
  446. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +20 -9
  447. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
  448. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
  449. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
  450. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
  451. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
  452. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/console.d.ts +5 -5
  453. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
  454. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
  455. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
  456. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
  457. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
  458. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
  459. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/events.d.ts +111 -65
  460. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
  461. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
  462. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
  463. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +202 -129
  464. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
  465. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +52 -153
  466. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
  467. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +5 -4
  468. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +24 -21
  469. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/os.d.ts +22 -18
  470. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/path.d.ts +4 -4
  471. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
  472. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/process.d.ts +43 -46
  473. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
  474. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
  475. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
  476. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
  477. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
  478. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
  479. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
  480. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
  481. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +498 -206
  482. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
  483. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
  484. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
  485. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
  486. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
  487. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/url.d.ts +46 -42
  488. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +150 -109
  489. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
  490. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
  491. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
  492. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
  493. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
  494. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +4 -5
  495. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +46 -42
  496. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +150 -109
  497. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +204 -16
  498. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +292 -42
  499. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +13 -19
  500. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +38 -34
  501. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +11 -11
  502. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  503. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +86 -75
  504. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +66 -49
  505. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +136 -97
  506. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +81 -55
  507. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +12 -12
  508. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +5 -5
  509. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +210 -221
  510. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +15 -15
  511. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +25 -26
  512. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +50 -6
  513. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +25 -16
  514. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +4 -4
  515. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +111 -65
  516. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +80 -49
  517. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +162 -91
  518. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +3 -1
  519. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +195 -129
  520. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +42 -46
  521. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +52 -153
  522. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +1 -1
  523. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +10 -3
  524. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +5 -4
  525. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +21 -18
  526. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +22 -18
  527. package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
  528. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +4 -4
  529. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +28 -15
  530. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +43 -46
  531. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +1 -1
  532. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +5 -5
  533. package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +65 -63
  534. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +32 -159
  535. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +20 -20
  536. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +1 -1
  537. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +839 -857
  538. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +6 -6
  539. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +498 -206
  540. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +3 -3
  541. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +122 -8
  542. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +34 -22
  543. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +20 -9
  544. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert.d.ts +86 -75
  545. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/async_hooks.d.ts +66 -49
  546. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/buffer.d.ts +137 -99
  547. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +81 -55
  548. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/cluster.d.ts +12 -12
  549. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/console.d.ts +5 -5
  550. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +210 -221
  551. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dgram.d.ts +15 -15
  552. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +25 -26
  553. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns/promises.d.ts +50 -6
  554. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns.d.ts +25 -16
  555. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
  556. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/events.d.ts +111 -65
  557. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs/promises.d.ts +96 -45
  558. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs.d.ts +243 -72
  559. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.d.ts +20 -11
  560. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +202 -129
  561. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +42 -46
  562. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +52 -153
  563. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/inspector.d.ts +10 -3
  564. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +5 -4
  565. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +24 -21
  566. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/os.d.ts +22 -18
  567. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/path.d.ts +4 -4
  568. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/perf_hooks.d.ts +28 -15
  569. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/process.d.ts +43 -46
  570. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/punycode.d.ts +1 -1
  571. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/querystring.d.ts +5 -5
  572. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline/promises.d.ts +65 -63
  573. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline.d.ts +32 -159
  574. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/repl.d.ts +20 -20
  575. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/consumers.d.ts +1 -1
  576. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +93 -140
  577. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/string_decoder.d.ts +6 -6
  578. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +498 -206
  579. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +3 -3
  580. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers.d.ts +125 -4
  581. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +34 -22
  582. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/trace_events.d.ts +20 -9
  583. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tty.d.ts +4 -5
  584. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/url.d.ts +46 -42
  585. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +150 -109
  586. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/v8.d.ts +204 -16
  587. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/vm.d.ts +292 -42
  588. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/wasi.d.ts +13 -19
  589. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/worker_threads.d.ts +38 -34
  590. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/zlib.d.ts +11 -11
  591. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +4 -5
  592. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +46 -42
  593. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +150 -109
  594. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +204 -16
  595. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +292 -42
  596. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +13 -19
  597. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +38 -34
  598. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +11 -11
  599. package/package.json +20 -20
@@ -1,28 +1,112 @@
1
1
  /**
2
- * The `node:test` module provides a standalone testing module.
3
- * @see [source](https://github.com/nodejs/node/blob/v18.x/lib/test.js)
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
- * Programmatically start the test runner.
8
- * @since v18.9.0
9
- * @param options Configuration options for running tests.
10
- * @returns A {@link TestsStream} that emits events about the test execution.
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 invocation of this
16
- * function results in reporting the test to the {@link TestsStream}.
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 {@link TestContext} object passed to the fn argument can be used to perform actions
19
- * related to the current test. Examples include skipping the test, adding additional
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 {@link Promise} that resolves once the test completes. The return value
23
- * can usually be discarded for top level tests. However, the return value from subtests should
24
- * be used to prevent the parent test from finishing first and cancelling the subtest as shown
25
- * in the following example.
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
- * @since v18.0.0
40
- * @param name The name of the test, which is displayed when reporting test results.
41
- * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
42
- * @param options Configuration options for the test
43
- * @param fn The function under test. The first argument to this function is a
44
- * {@link TestContext} object. If the test uses callbacks, the callback function is
45
- * passed as the second argument. Default: A no-op function.
46
- * @returns A {@link Promise} resolved with `undefined` once the test completes.
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
- * @since v18.6.0
55
- * @param name The name of the suite, which is displayed when reporting suite results.
56
- * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
57
- * @param options Configuration options for the suite
58
- * @param fn The function under suite. Default: A no-op function.
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
- // Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`.
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
- // Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.
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
- * @since v18.6.0
80
- * @param name The name of the test, which is displayed when reporting test results.
81
- * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
82
- * @param options Configuration options for the test
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?: ItFn): void;
87
- function it(name?: string, fn?: ItFn): void;
88
- function it(options?: TestOptions, fn?: ItFn): void;
89
- function it(fn?: ItFn): void;
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
- // Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
92
- function skip(name?: string, options?: TestOptions, fn?: ItFn): void;
93
- function skip(name?: string, fn?: ItFn): void;
94
- function skip(options?: TestOptions, fn?: ItFn): void;
95
- function skip(fn?: ItFn): void;
96
-
97
- // Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
98
- function todo(name?: string, options?: TestOptions, fn?: ItFn): void;
99
- function todo(name?: string, fn?: ItFn): void;
100
- function todo(options?: TestOptions, fn?: ItFn): void;
101
- function todo(fn?: ItFn): void;
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 of the `run()` method will return a new `TestsStream` object,
162
- * streaming a series of events representing the execution of the tests.
163
- * `TestsStream` will emit events in the order of the tests' definitions.
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
- interface TestsStream extends NodeJS.ReadableStream {
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 interact with the
322
- * test runner. However, the `TestContext` constructor is not exposed as part of the API.
323
- * @since v18.0.0
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
- interface TestContext {
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 information is
355
- * included at the end of the test's results. This function does not return a value.
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 have the `only`
369
- * option set. Otherwise, all tests are run. If Node.js was not started with the `--test-only`
370
- * command-line option, this function is a no-op.
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
- * Can be used to abort test subtasks when the test has been aborted.
378
- * @since v18.7.0
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 `message` is
384
- * provided, it is included in the output. Calling `skip()` does not terminate execution of
385
- * the test function. This function does not return a value.
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 provided, it is
393
- * included in the output. Calling `todo()` does not terminate execution of the test
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
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
469
- * the second argument. Default: A no-op function.
470
- * @param options Configuration options for the hook.
471
- * @since v18.8.0
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 running a suite.
477
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
478
- * the second argument. Default: A no-op function.
479
- * @param options Configuration options for the hook.
480
- * @since v18.8.0
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 before each subtest of the current suite.
486
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
487
- * the second argument. Default: A no-op function.
488
- * @param options Configuration options for the hook.
489
- * @since v18.8.0
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 after each subtest of the current test.
495
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
496
- * the second argument. Default: A no-op function.
497
- * @param options Configuration options for the hook.
498
- * @since v18.8.0
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
- interface MockTracker {
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
- * @param original An optional function to create a mock on.
565
- * @param implementation An optional function used as the mock implementation for `original`.
566
- * This is useful for creating mocks that exhibit one behavior for a specified number of calls and then restore the behavior of `original`.
567
- * @param options Optional configuration options for the mock function.
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 {@link MockTracker.method} with `options.getter` set to `true`.
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 {@link MockTracker.method} with `options.setter` set to `true`.
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 created by this `MockTracker`
659
- * and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used,
660
- * but the `MockTracker` instance can no longer be used to reset their behavior or otherwise interact with them.
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
- * If the global `MockTracker` is used extensively, calling this function manually is recommended.
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 created by this `MockTracker`.
669
- * Unlike `mock.reset()`, `mock.restoreAll()` does not disassociate the mocks from the `MockTracker` instance.
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
- interface MockFunctionContext<F extends Function> {
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 mock.
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
- * This function is more efficient than checking `ctx.calls.length`
727
- * because `ctx.calls` is a getter that creates a copy of the internal call tracking array.
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 invocation.
739
- * Once invocation `onCall` has occurred, the mock will revert to whatever behavior
740
- * it would have used had `mockImplementationOnce()` not been called.
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
- * The mock can still be used after calling this function.
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
  }