node-red-contrib-tak-registration 0.11.6 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert.d.ts +88 -44
- package/node_modules/@types/node/async_hooks.d.ts +17 -15
- package/node_modules/@types/node/buffer.d.ts +29 -110
- package/node_modules/@types/node/child_process.d.ts +38 -34
- package/node_modules/@types/node/cluster.d.ts +165 -19
- package/node_modules/@types/node/console.d.ts +64 -27
- package/node_modules/@types/node/crypto.d.ts +106 -142
- package/node_modules/@types/node/dgram.d.ts +14 -14
- package/node_modules/@types/node/diagnostics_channel.d.ts +12 -3
- package/node_modules/@types/node/dns/promises.d.ts +79 -28
- package/node_modules/@types/node/dns.d.ts +124 -69
- package/node_modules/@types/node/dom-events.d.ts +2 -0
- package/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/node/events.d.ts +115 -63
- package/node_modules/@types/node/fs/promises.d.ts +34 -12
- package/node_modules/@types/node/fs.d.ts +104 -40
- package/node_modules/@types/node/globals.d.ts +1 -0
- package/node_modules/@types/node/http.d.ts +69 -48
- package/node_modules/@types/node/http2.d.ts +83 -47
- package/node_modules/@types/node/https.d.ts +3 -3
- package/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/node/inspector.d.ts +5 -6
- package/node_modules/@types/node/module.d.ts +0 -14
- package/node_modules/@types/node/net.d.ts +58 -13
- package/node_modules/@types/node/os.d.ts +29 -12
- package/node_modules/@types/node/package.json +4 -16
- package/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/node/perf_hooks.d.ts +308 -48
- package/node_modules/@types/node/process.d.ts +241 -48
- package/node_modules/@types/node/punycode.d.ts +4 -4
- package/node_modules/@types/node/querystring.d.ts +18 -6
- package/node_modules/@types/node/readline/promises.d.ts +9 -9
- package/node_modules/@types/node/readline.d.ts +23 -22
- package/node_modules/@types/node/repl.d.ts +21 -21
- package/node_modules/@types/node/sea.d.ts +153 -0
- package/node_modules/@types/node/stream/web.d.ts +3 -2
- package/node_modules/@types/node/stream.d.ts +63 -57
- package/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/node_modules/@types/node/test.d.ts +363 -98
- package/node_modules/@types/node/timers/promises.d.ts +10 -6
- package/node_modules/@types/node/timers.d.ts +5 -5
- package/node_modules/@types/node/tls.d.ts +39 -32
- package/node_modules/@types/node/trace_events.d.ts +40 -25
- package/node_modules/@types/node/tty.d.ts +8 -8
- package/node_modules/@types/node/url.d.ts +15 -7
- package/node_modules/@types/node/util.d.ts +131 -22
- package/node_modules/@types/node/v8.d.ts +51 -7
- package/node_modules/@types/node/vm.d.ts +43 -24
- package/node_modules/@types/node/wasi.d.ts +12 -10
- package/node_modules/@types/node/worker_threads.d.ts +19 -16
- package/node_modules/@types/node/zlib.d.ts +16 -3
- package/node_modules/adm-zip/README.md +2 -1
- package/node_modules/adm-zip/adm-zip.js +46 -45
- package/node_modules/adm-zip/headers/entryHeader.js +14 -12
- package/node_modules/adm-zip/headers/mainHeader.js +1 -1
- package/node_modules/adm-zip/methods/inflater.js +6 -3
- package/node_modules/adm-zip/methods/zipcrypto.js +6 -2
- package/node_modules/adm-zip/package.json +2 -2
- package/node_modules/adm-zip/util/errors.js +1 -0
- package/node_modules/adm-zip/zipEntry.js +64 -43
- package/node_modules/adm-zip/zipFile.js +35 -35
- package/node_modules/axios/CHANGELOG.md +868 -759
- package/node_modules/axios/README.md +65 -17
- package/node_modules/axios/dist/axios.js +1330 -583
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +1 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +696 -316
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +696 -316
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +1 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +607 -257
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +5 -2
- package/node_modules/axios/index.d.ts +5 -2
- package/node_modules/axios/lib/adapters/adapters.js +3 -1
- package/node_modules/axios/lib/adapters/fetch.js +227 -0
- package/node_modules/axios/lib/adapters/http.js +1 -1
- package/node_modules/axios/lib/adapters/xhr.js +31 -101
- package/node_modules/axios/lib/core/Axios.js +17 -11
- package/node_modules/axios/lib/core/AxiosHeaders.js +4 -0
- package/node_modules/axios/lib/core/mergeConfig.js +1 -1
- package/node_modules/axios/lib/defaults/index.js +7 -5
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +9 -8
- package/node_modules/axios/lib/helpers/composeSignals.js +46 -0
- package/node_modules/axios/lib/helpers/progressEventReducer.js +32 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
- package/node_modules/axios/lib/helpers/throttle.js +5 -3
- package/node_modules/axios/lib/helpers/trackStream.js +55 -0
- package/node_modules/axios/lib/platform/common/utils.js +4 -1
- package/node_modules/axios/lib/utils.js +7 -2
- package/node_modules/axios/package.json +27 -26
- package/node_modules/fast-xml-parser/CHANGELOG.md +14 -0
- package/node_modules/fast-xml-parser/README.md +7 -14
- package/node_modules/fast-xml-parser/package.json +1 -1
- package/node_modules/fast-xml-parser/src/fxp.d.ts +4 -4
- package/node_modules/fast-xml-parser/src/v5/CharsSymbol.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/OptionsBuilder.js +64 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/BaseOutputBuilder.js +71 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsArrBuilder.js +103 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsMinArrBuilder.js +102 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder.js +156 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/ParserOptionsBuilder.js +96 -0
- package/node_modules/fast-xml-parser/src/v5/Report.js +0 -0
- package/node_modules/fast-xml-parser/src/v5/TagPath.js +81 -0
- package/node_modules/fast-xml-parser/src/v5/TagPathMatcher.js +15 -0
- package/node_modules/fast-xml-parser/src/v5/XMLParser.js +85 -0
- package/node_modules/fast-xml-parser/src/v5/Xml2JsParser.js +237 -0
- package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +212 -0
- package/node_modules/fast-xml-parser/src/v5/XmlSpecialTagsReader.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/BufferSource.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/StringSource.js +123 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParser.js +23 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParserExt.js +20 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/currency.js +31 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/join.js +14 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/number.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/trim.js +8 -0
- package/node_modules/fast-xml-parser/src/validator.js +2 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +13 -4
- package/node_modules/follow-redirects/index.js +1 -1
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/hasown/CHANGELOG.md +12 -0
- package/node_modules/hasown/index.d.ts +2 -2
- package/node_modules/hasown/package.json +5 -2
- package/node_modules/hasown/tsconfig.json +3 -46
- package/node_modules/object-is/.eslintrc +1 -1
- package/node_modules/object-is/.nycrc +0 -4
- package/node_modules/object-is/CHANGELOG.md +25 -0
- package/node_modules/object-is/README.md +20 -20
- package/node_modules/object-is/package.json +23 -14
- package/node_modules/protobufjs/LICENSE +39 -39
- package/node_modules/protobufjs/README.md +727 -740
- package/node_modules/protobufjs/dist/light/protobuf.js +6264 -6264
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +1928 -1928
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +7978 -7961
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/ext/debug/README.md +4 -4
- package/node_modules/protobufjs/ext/debug/index.js +71 -71
- package/node_modules/protobufjs/ext/descriptor/README.md +72 -72
- package/node_modules/protobufjs/ext/descriptor/index.d.ts +191 -191
- package/node_modules/protobufjs/ext/descriptor/index.js +1052 -1052
- package/node_modules/protobufjs/ext/descriptor/test.js +54 -54
- package/node_modules/protobufjs/google/LICENSE +27 -27
- package/node_modules/protobufjs/google/README.md +1 -1
- package/node_modules/protobufjs/google/api/annotations.json +82 -82
- package/node_modules/protobufjs/google/api/annotations.proto +10 -10
- package/node_modules/protobufjs/google/api/http.json +85 -85
- package/node_modules/protobufjs/google/api/http.proto +30 -30
- package/node_modules/protobufjs/google/protobuf/api.json +117 -117
- package/node_modules/protobufjs/google/protobuf/api.proto +33 -33
- package/node_modules/protobufjs/google/protobuf/descriptor.json +738 -738
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +286 -286
- package/node_modules/protobufjs/google/protobuf/source_context.json +19 -19
- package/node_modules/protobufjs/google/protobuf/source_context.proto +7 -7
- package/node_modules/protobufjs/google/protobuf/type.json +201 -201
- package/node_modules/protobufjs/google/protobuf/type.proto +89 -89
- package/node_modules/protobufjs/index.d.ts +2741 -2741
- package/node_modules/protobufjs/index.js +4 -4
- package/node_modules/protobufjs/light.d.ts +2 -2
- package/node_modules/protobufjs/light.js +3 -3
- package/node_modules/protobufjs/minimal.d.ts +2 -2
- package/node_modules/protobufjs/minimal.js +4 -4
- package/node_modules/protobufjs/package.json +111 -111
- package/node_modules/protobufjs/scripts/postinstall.js +32 -32
- package/node_modules/protobufjs/src/common.js +399 -399
- package/node_modules/protobufjs/src/converter.js +301 -301
- package/node_modules/protobufjs/src/decoder.js +129 -129
- package/node_modules/protobufjs/src/encoder.js +100 -100
- package/node_modules/protobufjs/src/enum.js +198 -198
- package/node_modules/protobufjs/src/field.js +377 -377
- package/node_modules/protobufjs/src/index-light.js +104 -104
- package/node_modules/protobufjs/src/index-minimal.js +36 -36
- package/node_modules/protobufjs/src/index.js +12 -12
- package/node_modules/protobufjs/src/mapfield.js +126 -126
- package/node_modules/protobufjs/src/message.js +138 -138
- package/node_modules/protobufjs/src/method.js +160 -160
- package/node_modules/protobufjs/src/namespace.js +433 -433
- package/node_modules/protobufjs/src/object.js +243 -243
- package/node_modules/protobufjs/src/oneof.js +203 -203
- package/node_modules/protobufjs/src/parse.js +889 -872
- package/node_modules/protobufjs/src/reader.js +416 -416
- package/node_modules/protobufjs/src/reader_buffer.js +51 -51
- package/node_modules/protobufjs/src/root.js +368 -368
- package/node_modules/protobufjs/src/roots.js +18 -18
- package/node_modules/protobufjs/src/rpc/service.js +142 -142
- package/node_modules/protobufjs/src/rpc.js +36 -36
- package/node_modules/protobufjs/src/service.js +167 -167
- package/node_modules/protobufjs/src/tokenize.js +416 -416
- package/node_modules/protobufjs/src/type.js +589 -589
- package/node_modules/protobufjs/src/types.js +196 -196
- package/node_modules/protobufjs/src/typescript.jsdoc +15 -15
- package/node_modules/protobufjs/src/util/longbits.js +200 -200
- package/node_modules/protobufjs/src/util/minimal.js +438 -438
- package/node_modules/protobufjs/src/util.js +212 -212
- package/node_modules/protobufjs/src/verifier.js +176 -176
- package/node_modules/protobufjs/src/wrappers.js +102 -102
- package/node_modules/protobufjs/src/writer.js +465 -465
- package/node_modules/protobufjs/src/writer_buffer.js +85 -85
- package/node_modules/protobufjs/tsconfig.json +7 -7
- package/node_modules/set-function-length/CHANGELOG.md +11 -0
- package/node_modules/set-function-length/env.d.ts +9 -6
- package/node_modules/set-function-length/env.js +1 -0
- package/node_modules/set-function-length/index.d.ts +6 -6
- package/node_modules/set-function-length/index.js +1 -3
- package/node_modules/set-function-length/package.json +11 -13
- package/node_modules/set-function-length/tsconfig.json +7 -57
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/balanced-pool.d.ts +11 -0
- package/node_modules/undici-types/client.d.ts +12 -1
- package/node_modules/undici-types/diagnostics-channel.d.ts +1 -2
- package/node_modules/undici-types/dispatcher.d.ts +17 -3
- package/node_modules/undici-types/eventsource.d.ts +61 -0
- package/node_modules/undici-types/fetch.d.ts +22 -23
- package/node_modules/undici-types/handlers.d.ts +10 -4
- package/node_modules/undici-types/index.d.ts +6 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/pool.d.ts +11 -0
- package/node_modules/undici-types/proxy-agent.d.ts +0 -2
- package/node_modules/undici-types/readable.d.ts +2 -3
- package/node_modules/undici-types/retry-agent.d.ts +11 -0
- package/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/node_modules/undici-types/util.d.ts +31 -0
- package/node_modules/undici-types/webidl.d.ts +6 -1
- package/node_modules/undici-types/websocket.d.ts +22 -1
- package/node_modules/uuid/CHANGELOG.md +18 -0
- package/node_modules/uuid/README.md +134 -16
- package/node_modules/uuid/dist/commonjs-browser/index.js +40 -15
- package/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
- package/node_modules/uuid/dist/commonjs-browser/md5.js +30 -53
- package/node_modules/uuid/dist/commonjs-browser/native.js +3 -4
- package/node_modules/uuid/dist/commonjs-browser/nil.js +1 -2
- package/node_modules/uuid/dist/commonjs-browser/parse.js +14 -15
- package/node_modules/uuid/dist/commonjs-browser/regex.js +1 -2
- package/node_modules/uuid/dist/commonjs-browser/rng.js +2 -4
- package/node_modules/uuid/dist/commonjs-browser/sha1.js +27 -49
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +10 -16
- package/node_modules/uuid/dist/commonjs-browser/v1.js +73 -49
- package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
- package/node_modules/uuid/dist/commonjs-browser/v3.js +3 -8
- package/node_modules/uuid/dist/commonjs-browser/v35.js +15 -32
- package/node_modules/uuid/dist/commonjs-browser/v4.js +7 -18
- package/node_modules/uuid/dist/commonjs-browser/v5.js +3 -8
- package/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
- package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
- package/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
- package/node_modules/uuid/dist/commonjs-browser/validate.js +2 -7
- package/node_modules/uuid/dist/commonjs-browser/version.js +2 -8
- package/node_modules/uuid/dist/esm-browser/index.js +9 -4
- package/node_modules/uuid/dist/esm-browser/max.js +1 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +29 -50
- package/node_modules/uuid/dist/esm-browser/native.js +1 -1
- package/node_modules/uuid/dist/esm-browser/parse.js +12 -10
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
- package/node_modules/uuid/dist/esm-browser/rng.js +3 -4
- package/node_modules/uuid/dist/esm-browser/sha1.js +26 -46
- package/node_modules/uuid/dist/esm-browser/stringify.js +9 -11
- package/node_modules/uuid/dist/esm-browser/v1.js +74 -44
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +20 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
- package/node_modules/uuid/dist/esm-browser/v35.js +14 -25
- package/node_modules/uuid/dist/esm-browser/v4.js +5 -9
- package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
- package/node_modules/uuid/dist/esm-browser/v6.js +36 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +20 -0
- package/node_modules/uuid/dist/esm-browser/v7.js +146 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +0 -2
- package/node_modules/uuid/dist/esm-browser/version.js +0 -3
- package/node_modules/uuid/dist/esm-node/index.js +9 -4
- package/node_modules/uuid/dist/esm-node/max.js +1 -0
- package/node_modules/uuid/dist/esm-node/md5.js +1 -4
- package/node_modules/uuid/dist/esm-node/native.js +1 -1
- package/node_modules/uuid/dist/esm-node/parse.js +11 -9
- package/node_modules/uuid/dist/esm-node/regex.js +1 -1
- package/node_modules/uuid/dist/esm-node/rng.js +1 -3
- package/node_modules/uuid/dist/esm-node/sha1.js +1 -4
- package/node_modules/uuid/dist/esm-node/stringify.js +7 -9
- package/node_modules/uuid/dist/esm-node/v1.js +66 -36
- package/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
- package/node_modules/uuid/dist/esm-node/v35.js +8 -19
- package/node_modules/uuid/dist/esm-node/v4.js +4 -8
- package/node_modules/uuid/dist/esm-node/v6.js +32 -0
- package/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
- package/node_modules/uuid/dist/esm-node/v7.js +146 -0
- package/node_modules/uuid/dist/esm-node/validate.js +0 -2
- package/node_modules/uuid/dist/esm-node/version.js +0 -3
- package/node_modules/uuid/dist/index.js +40 -15
- package/node_modules/uuid/dist/max.js +7 -0
- package/node_modules/uuid/dist/md5-browser.js +8 -31
- package/node_modules/uuid/dist/md5.js +4 -10
- package/node_modules/uuid/dist/native-browser.js +2 -3
- package/node_modules/uuid/dist/native.js +5 -9
- package/node_modules/uuid/dist/nil.js +1 -2
- package/node_modules/uuid/dist/parse.js +13 -14
- package/node_modules/uuid/dist/regex.js +1 -2
- package/node_modules/uuid/dist/rng-browser.js +1 -3
- package/node_modules/uuid/dist/rng.js +3 -10
- package/node_modules/uuid/dist/sha1-browser.js +1 -23
- package/node_modules/uuid/dist/sha1.js +4 -10
- package/node_modules/uuid/dist/stringify.js +8 -14
- package/node_modules/uuid/dist/uuid-bin.js +12 -22
- package/node_modules/uuid/dist/v1.js +66 -42
- package/node_modules/uuid/dist/v1ToV6.js +26 -0
- package/node_modules/uuid/dist/v3.js +2 -7
- package/node_modules/uuid/dist/v35.js +11 -28
- package/node_modules/uuid/dist/v4.js +6 -17
- package/node_modules/uuid/dist/v5.js +2 -7
- package/node_modules/uuid/dist/v6.js +38 -0
- package/node_modules/uuid/dist/v6ToV1.js +26 -0
- package/node_modules/uuid/dist/v7.js +152 -0
- package/node_modules/uuid/dist/validate.js +2 -7
- package/node_modules/uuid/dist/version.js +2 -8
- package/node_modules/uuid/package.json +41 -34
- package/node_modules/uuid/wrapper.mjs +5 -0
- package/package.json +6 -6
- package/tak-ingest.js +1 -1
- package/tak-registration.js +8 -1
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
- package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
- package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
- package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
- package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
- package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
- package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
- package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
- package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
- package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
- package/node_modules/@types/node/ts4.8/events.d.ts +0 -879
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
- package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
- package/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
- package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
- package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
- package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
- package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
- package/node_modules/@types/node/ts4.8/module.d.ts +0 -315
- package/node_modules/@types/node/ts4.8/net.d.ts +0 -954
- package/node_modules/@types/node/ts4.8/os.d.ts +0 -478
- package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
- package/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
- package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
- package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
- package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
- package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
- package/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
- package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
- package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
- package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
- package/node_modules/@types/node/ts4.8/url.d.ts +0 -944
- package/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
- package/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
- package/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
- package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
- package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
- package/node_modules/object-is/.eslintignore +0 -1
- package/node_modules/set-function-length/env.d.ts.map +0 -1
- package/node_modules/set-function-length/index.d.ts.map +0 -1
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
*
|
|
19
19
|
* 1. A synchronous function that is considered failing if it throws an exception,
|
|
20
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` fulfills.
|
|
21
|
+
* 2. A function that returns a `Promise` that is considered failing if the `Promise` rejects, and is considered passing if the `Promise` fulfills.
|
|
22
22
|
* 3. A function that receives a callback function. If the callback receives any
|
|
23
23
|
* truthy value as its first argument, the test is considered failing. If a
|
|
24
24
|
* falsy value is passed as the first argument to the callback, the test is
|
|
25
25
|
* considered passing. If the test function receives a callback function and
|
|
26
26
|
* also returns a `Promise`, the test will fail.
|
|
27
27
|
*
|
|
28
|
-
* The following example illustrates how tests are written using the`test` module.
|
|
28
|
+
* The following example illustrates how tests are written using the `test` module.
|
|
29
29
|
*
|
|
30
30
|
* ```js
|
|
31
31
|
* test('synchronous passing test', (t) => {
|
|
@@ -76,13 +76,13 @@
|
|
|
76
76
|
*
|
|
77
77
|
* If any tests fail, the process exit code is set to `1`.
|
|
78
78
|
* @since v18.0.0, v16.17.0
|
|
79
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
79
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/test.js)
|
|
80
80
|
*/
|
|
81
81
|
declare module "node:test" {
|
|
82
82
|
import { Readable } from "node:stream";
|
|
83
83
|
import { AsyncResource } from "node:async_hooks";
|
|
84
84
|
/**
|
|
85
|
-
* **Note
|
|
85
|
+
* **Note:** `shard` is used to horizontally parallelize test running across
|
|
86
86
|
* machines or processes, ideal for large-scale executions across varied
|
|
87
87
|
* environments. It's incompatible with `watch` mode, tailored for rapid
|
|
88
88
|
* code iteration by automatically rerunning tests on file changes.
|
|
@@ -110,7 +110,7 @@ declare module "node:test" {
|
|
|
110
110
|
* additional diagnostic information, or creating subtests.
|
|
111
111
|
*
|
|
112
112
|
* `test()` returns a `Promise` that fulfills once the test completes.
|
|
113
|
-
* if `test()` is called within a
|
|
113
|
+
* if `test()` is called within a suite, it fulfills immediately.
|
|
114
114
|
* The return value can usually be discarded for top level tests.
|
|
115
115
|
* However, the return value from subtests should be used to prevent the parent
|
|
116
116
|
* test from finishing first and cancelling the subtest
|
|
@@ -129,32 +129,65 @@ declare module "node:test" {
|
|
|
129
129
|
* });
|
|
130
130
|
* ```
|
|
131
131
|
*
|
|
132
|
-
* 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
|
|
132
|
+
* 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
|
|
133
133
|
* canceling tests because a running test might block the application thread and
|
|
134
134
|
* thus prevent the scheduled cancellation.
|
|
135
135
|
* @since v18.0.0, v16.17.0
|
|
136
136
|
* @param [name='The name'] The name of the test, which is displayed when reporting test results.
|
|
137
137
|
* @param options Configuration options for the test. The following properties are supported:
|
|
138
|
-
* @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
|
|
139
|
-
* second argument.
|
|
140
|
-
* @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within
|
|
138
|
+
* @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
|
|
139
|
+
* callback function is passed as the second argument.
|
|
140
|
+
* @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within a suite.
|
|
141
141
|
*/
|
|
142
142
|
function test(name?: string, fn?: TestFn): Promise<void>;
|
|
143
143
|
function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
144
144
|
function test(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
145
145
|
function test(fn?: TestFn): Promise<void>;
|
|
146
146
|
namespace test {
|
|
147
|
-
export { after, afterEach, before, beforeEach, describe, it, mock, only, run, skip, test, todo };
|
|
147
|
+
export { after, afterEach, before, beforeEach, describe, it, mock, only, run, skip, suite, test, todo };
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
|
-
* The `
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* @param [name='The name'] The name of the suite, which is displayed when reporting test results.
|
|
155
|
-
* @param options Configuration options for the suite. supports the same options as `test([name][, options][, fn])`.
|
|
156
|
-
* @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.
|
|
150
|
+
* The `suite()` function is imported from the `node:test` module.
|
|
151
|
+
* @param name The name of the suite, which is displayed when reporting test results. **Default:** The `name` property of `fn`, or `'<anonymous>'` if `fn` does not have a name.
|
|
152
|
+
* @param options Optional configuration options for the suite. This supports the same options as `test([name][, options][, fn])`.
|
|
153
|
+
* @param [fn='A no-op function'] The suite function declaring nested tests and suites. The first argument to this function is a `{@link SuiteContext}` object.
|
|
157
154
|
* @return Immediately fulfilled with `undefined`.
|
|
155
|
+
* @since v20.13.0
|
|
156
|
+
*/
|
|
157
|
+
function suite(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
158
|
+
function suite(name?: string, fn?: SuiteFn): Promise<void>;
|
|
159
|
+
function suite(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
160
|
+
function suite(fn?: SuiteFn): Promise<void>;
|
|
161
|
+
namespace suite {
|
|
162
|
+
/**
|
|
163
|
+
* Shorthand for skipping a suite. This is the same as [`suite([name], { skip: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#suitename-options-fn).
|
|
164
|
+
* @since v20.13.0
|
|
165
|
+
*/
|
|
166
|
+
function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
167
|
+
function skip(name?: string, fn?: SuiteFn): Promise<void>;
|
|
168
|
+
function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
169
|
+
function skip(fn?: SuiteFn): Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* Shorthand for marking a suite as `TODO`. This is the same as [`suite([name], { todo: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#suitename-options-fn).
|
|
172
|
+
* @since v20.13.0
|
|
173
|
+
*/
|
|
174
|
+
function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
175
|
+
function todo(name?: string, fn?: SuiteFn): Promise<void>;
|
|
176
|
+
function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
177
|
+
function todo(fn?: SuiteFn): Promise<void>;
|
|
178
|
+
/**
|
|
179
|
+
* Shorthand for marking a suite as `only`. This is the same as [`suite([name], { only: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#suitename-options-fn).
|
|
180
|
+
* @since v20.13.0
|
|
181
|
+
*/
|
|
182
|
+
function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
183
|
+
function only(name?: string, fn?: SuiteFn): Promise<void>;
|
|
184
|
+
function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
185
|
+
function only(fn?: SuiteFn): Promise<void>;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Alias for `{@link suite}`.
|
|
189
|
+
*
|
|
190
|
+
* The `describe()` function is imported from the `node:test` module.
|
|
158
191
|
*/
|
|
159
192
|
function describe(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
160
193
|
function describe(name?: string, fn?: SuiteFn): Promise<void>;
|
|
@@ -162,21 +195,23 @@ declare module "node:test" {
|
|
|
162
195
|
function describe(fn?: SuiteFn): Promise<void>;
|
|
163
196
|
namespace describe {
|
|
164
197
|
/**
|
|
165
|
-
* Shorthand for skipping a suite
|
|
198
|
+
* Shorthand for skipping a suite. This is the same as [`describe([name], { skip: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#describename-options-fn).
|
|
199
|
+
* @since v18.15.0
|
|
166
200
|
*/
|
|
167
201
|
function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
168
202
|
function skip(name?: string, fn?: SuiteFn): Promise<void>;
|
|
169
203
|
function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
170
204
|
function skip(fn?: SuiteFn): Promise<void>;
|
|
171
205
|
/**
|
|
172
|
-
* Shorthand for marking a suite as `TODO
|
|
206
|
+
* Shorthand for marking a suite as `TODO`. This is the same as [`describe([name], { todo: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#describename-options-fn).
|
|
207
|
+
* @since v18.15.0
|
|
173
208
|
*/
|
|
174
209
|
function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
175
210
|
function todo(name?: string, fn?: SuiteFn): Promise<void>;
|
|
176
211
|
function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
177
212
|
function todo(fn?: SuiteFn): Promise<void>;
|
|
178
213
|
/**
|
|
179
|
-
* Shorthand for marking a suite as `only
|
|
214
|
+
* Shorthand for marking a suite as `only`. This is the same as [`describe([name], { only: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#describename-options-fn).
|
|
180
215
|
* @since v18.15.0
|
|
181
216
|
*/
|
|
182
217
|
function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
@@ -185,7 +220,7 @@ declare module "node:test" {
|
|
|
185
220
|
function only(fn?: SuiteFn): Promise<void>;
|
|
186
221
|
}
|
|
187
222
|
/**
|
|
188
|
-
*
|
|
223
|
+
* Alias for `test()`.
|
|
189
224
|
*
|
|
190
225
|
* The `it()` function is imported from the `node:test` module.
|
|
191
226
|
* @since v18.6.0, v16.17.0
|
|
@@ -264,49 +299,57 @@ declare module "node:test" {
|
|
|
264
299
|
}
|
|
265
300
|
interface RunOptions {
|
|
266
301
|
/**
|
|
267
|
-
* If a number is provided, then that many
|
|
268
|
-
* If
|
|
269
|
-
*
|
|
270
|
-
* If unspecified, subtests inherit this value from their parent.
|
|
271
|
-
* @default true
|
|
302
|
+
* If a number is provided, then that many test processes would run in parallel, where each process corresponds to one test file.
|
|
303
|
+
* If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time.
|
|
304
|
+
* @default false
|
|
272
305
|
*/
|
|
273
306
|
concurrency?: number | boolean | undefined;
|
|
274
307
|
/**
|
|
275
|
-
* An array containing the list of files to run.
|
|
276
|
-
*
|
|
308
|
+
* An array containing the list of files to run. **Default** matching files from
|
|
309
|
+
* [test runner execution model](https://nodejs.org/docs/latest-v22.x/api/test.html#test-runner-execution-model).
|
|
277
310
|
*/
|
|
278
311
|
files?: readonly string[] | undefined;
|
|
279
312
|
/**
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* A number of milliseconds the test will fail after.
|
|
286
|
-
* If unspecified, subtests inherit this value from their parent.
|
|
287
|
-
* @default Infinity
|
|
313
|
+
* Configures the test runner to exit the process once all known
|
|
314
|
+
* tests have finished executing even if the event loop would
|
|
315
|
+
* otherwise remain active.
|
|
316
|
+
* @default false
|
|
288
317
|
*/
|
|
289
|
-
|
|
318
|
+
forceExit?: boolean | undefined;
|
|
290
319
|
/**
|
|
291
320
|
* Sets inspector port of test child process.
|
|
292
321
|
* If a nullish value is provided, each process gets its own port,
|
|
293
322
|
* incremented from the primary's `process.debugPort`.
|
|
323
|
+
* @default undefined
|
|
294
324
|
*/
|
|
295
325
|
inspectPort?: number | (() => number) | undefined;
|
|
296
|
-
/**
|
|
297
|
-
* That can be used to only run tests whose name matches the provided pattern.
|
|
298
|
-
* Test name patterns are interpreted as JavaScript regular expressions.
|
|
299
|
-
* For each test that is executed, any corresponding test hooks, such as `beforeEach()`, are also run.
|
|
300
|
-
*/
|
|
301
|
-
testNamePatterns?: string | RegExp | string[] | RegExp[];
|
|
302
326
|
/**
|
|
303
327
|
* If truthy, the test context will only run tests that have the `only` option set
|
|
304
328
|
*/
|
|
305
329
|
only?: boolean;
|
|
306
330
|
/**
|
|
307
|
-
* A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.
|
|
331
|
+
* A function that accepts the `TestsStream` instance and can be used to setup listeners before any tests are run.
|
|
332
|
+
* @default undefined
|
|
308
333
|
*/
|
|
309
334
|
setup?: (root: Test) => void | Promise<void>;
|
|
335
|
+
/**
|
|
336
|
+
* Allows aborting an in-progress test execution.
|
|
337
|
+
*/
|
|
338
|
+
signal?: AbortSignal | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* A String, RegExp or a RegExp Array, that can be used to only run tests whose
|
|
341
|
+
* name matches the provided pattern. Test name patterns are interpreted as JavaScript
|
|
342
|
+
* regular expressions. For each test that is executed, any corresponding test hooks,
|
|
343
|
+
* such as `beforeEach()`, are also run.
|
|
344
|
+
* @default undefined
|
|
345
|
+
*/
|
|
346
|
+
testNamePatterns?: string | RegExp | string[] | RegExp[];
|
|
347
|
+
/**
|
|
348
|
+
* A number of milliseconds the test execution will fail after.
|
|
349
|
+
* If unspecified, subtests inherit this value from their parent.
|
|
350
|
+
* @default Infinity
|
|
351
|
+
*/
|
|
352
|
+
timeout?: number | undefined;
|
|
310
353
|
/**
|
|
311
354
|
* Whether to run in watch mode or not.
|
|
312
355
|
* @default false
|
|
@@ -328,12 +371,18 @@ declare module "node:test" {
|
|
|
328
371
|
timeout: number | null;
|
|
329
372
|
}
|
|
330
373
|
/**
|
|
331
|
-
* A successful call to `run()` method will return a new `TestsStream` object, streaming a series of events representing the execution of the tests
|
|
374
|
+
* 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
|
|
332
375
|
* order of the tests definition
|
|
376
|
+
*
|
|
377
|
+
* Some of the events are guaranteed to be emitted in the same order as the tests are defined, while others are emitted in the order that the tests execute.
|
|
333
378
|
* @since v18.9.0, v16.19.0
|
|
334
379
|
*/
|
|
335
380
|
class TestsStream extends Readable implements NodeJS.ReadableStream {
|
|
381
|
+
addListener(event: "test:coverage", listener: (data: TestCoverage) => void): this;
|
|
382
|
+
addListener(event: "test:complete", listener: (data: TestComplete) => void): this;
|
|
383
|
+
addListener(event: "test:dequeue", listener: (data: TestDequeue) => void): this;
|
|
336
384
|
addListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
|
|
385
|
+
addListener(event: "test:enqueue", listener: (data: TestEnqueue) => void): this;
|
|
337
386
|
addListener(event: "test:fail", listener: (data: TestFail) => void): this;
|
|
338
387
|
addListener(event: "test:pass", listener: (data: TestPass) => void): this;
|
|
339
388
|
addListener(event: "test:plan", listener: (data: TestPlan) => void): this;
|
|
@@ -341,7 +390,11 @@ declare module "node:test" {
|
|
|
341
390
|
addListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
|
|
342
391
|
addListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
|
|
343
392
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
393
|
+
emit(event: "test:coverage", data: TestCoverage): boolean;
|
|
394
|
+
emit(event: "test:complete", data: TestComplete): boolean;
|
|
395
|
+
emit(event: "test:dequeue", data: TestDequeue): boolean;
|
|
344
396
|
emit(event: "test:diagnostic", data: DiagnosticData): boolean;
|
|
397
|
+
emit(event: "test:enqueue", data: TestEnqueue): boolean;
|
|
345
398
|
emit(event: "test:fail", data: TestFail): boolean;
|
|
346
399
|
emit(event: "test:pass", data: TestPass): boolean;
|
|
347
400
|
emit(event: "test:plan", data: TestPlan): boolean;
|
|
@@ -349,7 +402,11 @@ declare module "node:test" {
|
|
|
349
402
|
emit(event: "test:stderr", data: TestStderr): boolean;
|
|
350
403
|
emit(event: "test:stdout", data: TestStdout): boolean;
|
|
351
404
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
405
|
+
on(event: "test:coverage", listener: (data: TestCoverage) => void): this;
|
|
406
|
+
on(event: "test:complete", listener: (data: TestComplete) => void): this;
|
|
407
|
+
on(event: "test:dequeue", listener: (data: TestDequeue) => void): this;
|
|
352
408
|
on(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
|
|
409
|
+
on(event: "test:enqueue", listener: (data: TestEnqueue) => void): this;
|
|
353
410
|
on(event: "test:fail", listener: (data: TestFail) => void): this;
|
|
354
411
|
on(event: "test:pass", listener: (data: TestPass) => void): this;
|
|
355
412
|
on(event: "test:plan", listener: (data: TestPlan) => void): this;
|
|
@@ -357,7 +414,11 @@ declare module "node:test" {
|
|
|
357
414
|
on(event: "test:stderr", listener: (data: TestStderr) => void): this;
|
|
358
415
|
on(event: "test:stdout", listener: (data: TestStdout) => void): this;
|
|
359
416
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
417
|
+
once(event: "test:coverage", listener: (data: TestCoverage) => void): this;
|
|
418
|
+
once(event: "test:complete", listener: (data: TestComplete) => void): this;
|
|
419
|
+
once(event: "test:dequeue", listener: (data: TestDequeue) => void): this;
|
|
360
420
|
once(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
|
|
421
|
+
once(event: "test:enqueue", listener: (data: TestEnqueue) => void): this;
|
|
361
422
|
once(event: "test:fail", listener: (data: TestFail) => void): this;
|
|
362
423
|
once(event: "test:pass", listener: (data: TestPass) => void): this;
|
|
363
424
|
once(event: "test:plan", listener: (data: TestPlan) => void): this;
|
|
@@ -365,7 +426,11 @@ declare module "node:test" {
|
|
|
365
426
|
once(event: "test:stderr", listener: (data: TestStderr) => void): this;
|
|
366
427
|
once(event: "test:stdout", listener: (data: TestStdout) => void): this;
|
|
367
428
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
429
|
+
prependListener(event: "test:coverage", listener: (data: TestCoverage) => void): this;
|
|
430
|
+
prependListener(event: "test:complete", listener: (data: TestComplete) => void): this;
|
|
431
|
+
prependListener(event: "test:dequeue", listener: (data: TestDequeue) => void): this;
|
|
368
432
|
prependListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
|
|
433
|
+
prependListener(event: "test:enqueue", listener: (data: TestEnqueue) => void): this;
|
|
369
434
|
prependListener(event: "test:fail", listener: (data: TestFail) => void): this;
|
|
370
435
|
prependListener(event: "test:pass", listener: (data: TestPass) => void): this;
|
|
371
436
|
prependListener(event: "test:plan", listener: (data: TestPlan) => void): this;
|
|
@@ -373,7 +438,11 @@ declare module "node:test" {
|
|
|
373
438
|
prependListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
|
|
374
439
|
prependListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
|
|
375
440
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
441
|
+
prependOnceListener(event: "test:coverage", listener: (data: TestCoverage) => void): this;
|
|
442
|
+
prependOnceListener(event: "test:complete", listener: (data: TestComplete) => void): this;
|
|
443
|
+
prependOnceListener(event: "test:dequeue", listener: (data: TestDequeue) => void): this;
|
|
376
444
|
prependOnceListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
|
|
445
|
+
prependOnceListener(event: "test:enqueue", listener: (data: TestEnqueue) => void): this;
|
|
377
446
|
prependOnceListener(event: "test:fail", listener: (data: TestFail) => void): this;
|
|
378
447
|
prependOnceListener(event: "test:pass", listener: (data: TestPass) => void): this;
|
|
379
448
|
prependOnceListener(event: "test:plan", listener: (data: TestPlan) => void): this;
|
|
@@ -392,7 +461,7 @@ declare module "node:test" {
|
|
|
392
461
|
/**
|
|
393
462
|
* This function is used to create a hook running before subtest of the current test.
|
|
394
463
|
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
|
395
|
-
* the second argument. Default
|
|
464
|
+
* the second argument. **Default:** A no-op function.
|
|
396
465
|
* @param options Configuration options for the hook.
|
|
397
466
|
* @since v20.1.0
|
|
398
467
|
*/
|
|
@@ -400,14 +469,14 @@ declare module "node:test" {
|
|
|
400
469
|
/**
|
|
401
470
|
* This function is used to create a hook running before each subtest of the current test.
|
|
402
471
|
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
|
403
|
-
* the second argument. Default
|
|
472
|
+
* the second argument. **Default:** A no-op function.
|
|
404
473
|
* @param options Configuration options for the hook.
|
|
405
474
|
* @since v18.8.0
|
|
406
475
|
*/
|
|
407
476
|
beforeEach: typeof beforeEach;
|
|
408
477
|
/**
|
|
409
478
|
* This function is used to create a hook that runs after the current test finishes.
|
|
410
|
-
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
|
479
|
+
* @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as
|
|
411
480
|
* the second argument. Default: A no-op function.
|
|
412
481
|
* @param options Configuration options for the hook.
|
|
413
482
|
* @since v18.13.0
|
|
@@ -416,7 +485,7 @@ declare module "node:test" {
|
|
|
416
485
|
/**
|
|
417
486
|
* This function is used to create a hook running after each subtest of the current test.
|
|
418
487
|
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
|
419
|
-
* the second argument. Default
|
|
488
|
+
* the second argument. **Default:** A no-op function.
|
|
420
489
|
* @param options Configuration options for the hook.
|
|
421
490
|
* @since v18.8.0
|
|
422
491
|
*/
|
|
@@ -470,7 +539,7 @@ declare module "node:test" {
|
|
|
470
539
|
*/
|
|
471
540
|
readonly signal: AbortSignal;
|
|
472
541
|
/**
|
|
473
|
-
* 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
|
|
542
|
+
* 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
|
|
474
543
|
* not terminate execution of the test function. This function does not return a
|
|
475
544
|
* value.
|
|
476
545
|
*
|
|
@@ -508,7 +577,7 @@ declare module "node:test" {
|
|
|
508
577
|
* @param options Configuration options for the test
|
|
509
578
|
* @param fn The function under test. This first argument to this function is a
|
|
510
579
|
* {@link TestContext} object. If the test uses callbacks, the callback function is
|
|
511
|
-
* passed as the second argument. Default
|
|
580
|
+
* passed as the second argument. **Default:** A no-op function.
|
|
512
581
|
* @returns A {@link Promise} resolved with `undefined` once the test completes.
|
|
513
582
|
*/
|
|
514
583
|
test: typeof test;
|
|
@@ -517,6 +586,7 @@ declare module "node:test" {
|
|
|
517
586
|
*/
|
|
518
587
|
readonly mock: MockTracker;
|
|
519
588
|
}
|
|
589
|
+
|
|
520
590
|
/**
|
|
521
591
|
* An instance of `SuiteContext` is passed to each suite function in order to
|
|
522
592
|
* interact with the test runner. However, the `SuiteContext` constructor is not
|
|
@@ -577,7 +647,7 @@ declare module "node:test" {
|
|
|
577
647
|
todo?: boolean | string | undefined;
|
|
578
648
|
}
|
|
579
649
|
/**
|
|
580
|
-
* This function
|
|
650
|
+
* This function creates a hook that runs before executing a suite.
|
|
581
651
|
*
|
|
582
652
|
* ```js
|
|
583
653
|
* describe('tests', async () => {
|
|
@@ -593,7 +663,7 @@ declare module "node:test" {
|
|
|
593
663
|
*/
|
|
594
664
|
function before(fn?: HookFn, options?: HookOptions): void;
|
|
595
665
|
/**
|
|
596
|
-
* This function
|
|
666
|
+
* This function creates a hook that runs after executing a suite.
|
|
597
667
|
*
|
|
598
668
|
* ```js
|
|
599
669
|
* describe('tests', async () => {
|
|
@@ -609,8 +679,7 @@ declare module "node:test" {
|
|
|
609
679
|
*/
|
|
610
680
|
function after(fn?: HookFn, options?: HookOptions): void;
|
|
611
681
|
/**
|
|
612
|
-
* This function
|
|
613
|
-
* before each subtest of the current suite.
|
|
682
|
+
* This function creates a hook that runs before each test in the current suite.
|
|
614
683
|
*
|
|
615
684
|
* ```js
|
|
616
685
|
* describe('tests', async () => {
|
|
@@ -626,8 +695,8 @@ declare module "node:test" {
|
|
|
626
695
|
*/
|
|
627
696
|
function beforeEach(fn?: HookFn, options?: HookOptions): void;
|
|
628
697
|
/**
|
|
629
|
-
* This function
|
|
630
|
-
*
|
|
698
|
+
* This function creates a hook that runs after each test in the current suite.
|
|
699
|
+
* The `afterEach()` hook is run even if the test fails.
|
|
631
700
|
*
|
|
632
701
|
* ```js
|
|
633
702
|
* describe('tests', async () => {
|
|
@@ -695,7 +764,7 @@ declare module "node:test" {
|
|
|
695
764
|
/**
|
|
696
765
|
* The `MockTracker` class is used to manage mocking functionality. The test runner
|
|
697
766
|
* module provides a top level `mock` export which is a `MockTracker` instance.
|
|
698
|
-
* Each test also provides its own `MockTracker` instance via the test context's`mock` property.
|
|
767
|
+
* Each test also provides its own `MockTracker` instance via the test context's `mock` property.
|
|
699
768
|
* @since v19.1.0, v18.13.0
|
|
700
769
|
*/
|
|
701
770
|
class MockTracker {
|
|
@@ -811,7 +880,7 @@ declare module "node:test" {
|
|
|
811
880
|
): Mock<Function>;
|
|
812
881
|
|
|
813
882
|
/**
|
|
814
|
-
* This function is syntax sugar for `MockTracker.method` with `options.getter`set to `true`.
|
|
883
|
+
* This function is syntax sugar for `MockTracker.method` with `options.getter` set to `true`.
|
|
815
884
|
* @since v19.3.0, v18.13.0
|
|
816
885
|
*/
|
|
817
886
|
getter<
|
|
@@ -833,7 +902,7 @@ declare module "node:test" {
|
|
|
833
902
|
options?: MockFunctionOptions,
|
|
834
903
|
): Mock<(() => MockedObject[MethodName]) | Implementation>;
|
|
835
904
|
/**
|
|
836
|
-
* This function is syntax sugar for `MockTracker.method` with `options.setter`set to `true`.
|
|
905
|
+
* This function is syntax sugar for `MockTracker.method` with `options.setter` set to `true`.
|
|
837
906
|
* @since v19.3.0, v18.13.0
|
|
838
907
|
*/
|
|
839
908
|
setter<
|
|
@@ -856,11 +925,11 @@ declare module "node:test" {
|
|
|
856
925
|
): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
|
|
857
926
|
/**
|
|
858
927
|
* This function restores the default behavior of all mocks that were previously
|
|
859
|
-
* 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
|
|
928
|
+
* 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
|
|
860
929
|
* used to reset their behavior or
|
|
861
930
|
* otherwise interact with them.
|
|
862
931
|
*
|
|
863
|
-
* After each test completes, this function is called on the test context's`MockTracker`. If the global `MockTracker` is used extensively, calling this
|
|
932
|
+
* After each test completes, this function is called on the test context's `MockTracker`. If the global `MockTracker` is used extensively, calling this
|
|
864
933
|
* function manually is recommended.
|
|
865
934
|
* @since v19.1.0, v18.13.0
|
|
866
935
|
*/
|
|
@@ -872,6 +941,17 @@ declare module "node:test" {
|
|
|
872
941
|
* @since v19.1.0, v18.13.0
|
|
873
942
|
*/
|
|
874
943
|
restoreAll(): void;
|
|
944
|
+
/**
|
|
945
|
+
* This function is used to mock the exports of ECMAScript modules,
|
|
946
|
+
* CommonJS modules, and Node.js builtin modules. Any references to
|
|
947
|
+
* the original module prior to mocking are not impacted
|
|
948
|
+
* @since v22.3.0
|
|
949
|
+
*/
|
|
950
|
+
module(speficier: string, options?: {
|
|
951
|
+
cache?: boolean;
|
|
952
|
+
defaultExport?: any;
|
|
953
|
+
namedExports?: object;
|
|
954
|
+
}): { restore: () => void };
|
|
875
955
|
timers: MockTimers;
|
|
876
956
|
}
|
|
877
957
|
const mock: MockTracker;
|
|
@@ -926,7 +1006,7 @@ declare module "node:test" {
|
|
|
926
1006
|
readonly calls: Array<MockFunctionCall<F>>;
|
|
927
1007
|
/**
|
|
928
1008
|
* This function returns the number of times that this mock has been invoked. This
|
|
929
|
-
* 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.
|
|
1009
|
+
* 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.
|
|
930
1010
|
* @since v19.1.0, v18.13.0
|
|
931
1011
|
* @return The number of times that this mock has been invoked.
|
|
932
1012
|
*/
|
|
@@ -962,7 +1042,7 @@ declare module "node:test" {
|
|
|
962
1042
|
* @since v19.1.0, v18.13.0
|
|
963
1043
|
* @param implementation The function to be used as the mock's new implementation.
|
|
964
1044
|
*/
|
|
965
|
-
mockImplementation(implementation:
|
|
1045
|
+
mockImplementation(implementation: F): void;
|
|
966
1046
|
/**
|
|
967
1047
|
* This function is used to change the behavior of an existing mock for a single
|
|
968
1048
|
* invocation. Once invocation `onCall` has occurred, the mock will revert to
|
|
@@ -999,7 +1079,7 @@ declare module "node:test" {
|
|
|
999
1079
|
* @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`.
|
|
1000
1080
|
* @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown.
|
|
1001
1081
|
*/
|
|
1002
|
-
mockImplementationOnce(implementation:
|
|
1082
|
+
mockImplementationOnce(implementation: F, onCall?: number): void;
|
|
1003
1083
|
/**
|
|
1004
1084
|
* Resets the call history of the mock function.
|
|
1005
1085
|
* @since v19.3.0, v18.13.0
|
|
@@ -1050,7 +1130,7 @@ declare module "node:test" {
|
|
|
1050
1130
|
*
|
|
1051
1131
|
* The above example enables mocking for the `Date` constructor, `setInterval` timer and
|
|
1052
1132
|
* implicitly mocks the `clearInterval` function. Only the `Date` constructor from `globalThis`,
|
|
1053
|
-
* `setInterval` and `clearInterval` functions from `node:timers
|
|
1133
|
+
* `setInterval` and `clearInterval` functions from `node:timers`, `node:timers/promises`, and `globalThis` will be mocked.
|
|
1054
1134
|
*
|
|
1055
1135
|
* Example usage with initial time set
|
|
1056
1136
|
*
|
|
@@ -1075,7 +1155,9 @@ declare module "node:test" {
|
|
|
1075
1155
|
* and `globalThis` will be mocked.
|
|
1076
1156
|
* The `Date` constructor from `globalThis` will be mocked.
|
|
1077
1157
|
*
|
|
1078
|
-
* If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can
|
|
1158
|
+
* If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can
|
|
1159
|
+
* set an initial date by passing a now property to the `.enable()` method. This value will be used as the initial date for the mocked Date
|
|
1160
|
+
* object. It can either be a positive integer, or another Date object.
|
|
1079
1161
|
* @since v20.4.0
|
|
1080
1162
|
*/
|
|
1081
1163
|
enable(options?: MockTimersOptions): void;
|
|
@@ -1244,8 +1326,11 @@ declare module "node:test" {
|
|
|
1244
1326
|
only,
|
|
1245
1327
|
run,
|
|
1246
1328
|
skip,
|
|
1329
|
+
suite,
|
|
1330
|
+
SuiteContext,
|
|
1247
1331
|
test,
|
|
1248
1332
|
test as default,
|
|
1333
|
+
TestContext,
|
|
1249
1334
|
todo,
|
|
1250
1335
|
};
|
|
1251
1336
|
}
|
|
@@ -1257,12 +1342,11 @@ interface TestLocationInfo {
|
|
|
1257
1342
|
*/
|
|
1258
1343
|
column?: number;
|
|
1259
1344
|
/**
|
|
1260
|
-
* The path of the test file, `undefined` if test
|
|
1345
|
+
* The path of the test file, `undefined` if test was run through the REPL.
|
|
1261
1346
|
*/
|
|
1262
1347
|
file?: string;
|
|
1263
1348
|
/**
|
|
1264
|
-
* The line number where the test is defined, or
|
|
1265
|
-
* `undefined` if the test was run through the REPL.
|
|
1349
|
+
* The line number where the test is defined, or `undefined` if the test was run through the REPL.
|
|
1266
1350
|
*/
|
|
1267
1351
|
line?: number;
|
|
1268
1352
|
}
|
|
@@ -1276,6 +1360,202 @@ interface DiagnosticData extends TestLocationInfo {
|
|
|
1276
1360
|
*/
|
|
1277
1361
|
nesting: number;
|
|
1278
1362
|
}
|
|
1363
|
+
interface TestCoverage {
|
|
1364
|
+
/**
|
|
1365
|
+
* An object containing the coverage report.
|
|
1366
|
+
*/
|
|
1367
|
+
summary: {
|
|
1368
|
+
/**
|
|
1369
|
+
* An array of coverage reports for individual files. Each report is an object with the following schema:
|
|
1370
|
+
*/
|
|
1371
|
+
files: Array<{
|
|
1372
|
+
/**
|
|
1373
|
+
* The absolute path of the file.
|
|
1374
|
+
*/
|
|
1375
|
+
path: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* The total number of lines.
|
|
1378
|
+
*/
|
|
1379
|
+
totalLineCount: number;
|
|
1380
|
+
/**
|
|
1381
|
+
* The total number of branches.
|
|
1382
|
+
*/
|
|
1383
|
+
totalBranchCount: number;
|
|
1384
|
+
/**
|
|
1385
|
+
* The total number of functions.
|
|
1386
|
+
*/
|
|
1387
|
+
totalFunctionCount: number;
|
|
1388
|
+
/**
|
|
1389
|
+
* The number of covered lines.
|
|
1390
|
+
*/
|
|
1391
|
+
coveredLineCount: number;
|
|
1392
|
+
/**
|
|
1393
|
+
* The number of covered branches.
|
|
1394
|
+
*/
|
|
1395
|
+
coveredBranchCount: number;
|
|
1396
|
+
/**
|
|
1397
|
+
* The number of covered functions.
|
|
1398
|
+
*/
|
|
1399
|
+
coveredFunctionCount: number;
|
|
1400
|
+
/**
|
|
1401
|
+
* The percentage of lines covered.
|
|
1402
|
+
*/
|
|
1403
|
+
coveredLinePercent: number;
|
|
1404
|
+
/**
|
|
1405
|
+
* The percentage of branches covered.
|
|
1406
|
+
*/
|
|
1407
|
+
coveredBranchPercent: number;
|
|
1408
|
+
/**
|
|
1409
|
+
* The percentage of functions covered.
|
|
1410
|
+
*/
|
|
1411
|
+
coveredFunctionPercent: number;
|
|
1412
|
+
/**
|
|
1413
|
+
* An array of functions representing function coverage.
|
|
1414
|
+
*/
|
|
1415
|
+
functions: Array<{
|
|
1416
|
+
/**
|
|
1417
|
+
* The name of the function.
|
|
1418
|
+
*/
|
|
1419
|
+
name: string;
|
|
1420
|
+
/**
|
|
1421
|
+
* The line number where the function is defined.
|
|
1422
|
+
*/
|
|
1423
|
+
line: number;
|
|
1424
|
+
/**
|
|
1425
|
+
* The number of times the function was called.
|
|
1426
|
+
*/
|
|
1427
|
+
count: number;
|
|
1428
|
+
}>;
|
|
1429
|
+
/**
|
|
1430
|
+
* An array of lines representing line numbers and the number of times they were covered.
|
|
1431
|
+
*/
|
|
1432
|
+
lines: Array<{
|
|
1433
|
+
/**
|
|
1434
|
+
* The line number.
|
|
1435
|
+
*/
|
|
1436
|
+
line: number;
|
|
1437
|
+
/**
|
|
1438
|
+
* The number of times the line was covered.
|
|
1439
|
+
*/
|
|
1440
|
+
count: number;
|
|
1441
|
+
}>;
|
|
1442
|
+
}>;
|
|
1443
|
+
/**
|
|
1444
|
+
* An object containing a summary of coverage for all files.
|
|
1445
|
+
*/
|
|
1446
|
+
totals: {
|
|
1447
|
+
/**
|
|
1448
|
+
* The total number of lines.
|
|
1449
|
+
*/
|
|
1450
|
+
totalLineCount: number;
|
|
1451
|
+
/**
|
|
1452
|
+
* The total number of branches.
|
|
1453
|
+
*/
|
|
1454
|
+
totalBranchCount: number;
|
|
1455
|
+
/**
|
|
1456
|
+
* The total number of functions.
|
|
1457
|
+
*/
|
|
1458
|
+
totalFunctionCount: number;
|
|
1459
|
+
/**
|
|
1460
|
+
* The number of covered lines.
|
|
1461
|
+
*/
|
|
1462
|
+
coveredLineCount: number;
|
|
1463
|
+
/**
|
|
1464
|
+
* The number of covered branches.
|
|
1465
|
+
*/
|
|
1466
|
+
coveredBranchCount: number;
|
|
1467
|
+
/**
|
|
1468
|
+
* The number of covered functions.
|
|
1469
|
+
*/
|
|
1470
|
+
coveredFunctionCount: number;
|
|
1471
|
+
/**
|
|
1472
|
+
* The percentage of lines covered.
|
|
1473
|
+
*/
|
|
1474
|
+
coveredLinePercent: number;
|
|
1475
|
+
/**
|
|
1476
|
+
* The percentage of branches covered.
|
|
1477
|
+
*/
|
|
1478
|
+
coveredBranchPercent: number;
|
|
1479
|
+
/**
|
|
1480
|
+
* The percentage of functions covered.
|
|
1481
|
+
*/
|
|
1482
|
+
coveredFunctionPercent: number;
|
|
1483
|
+
};
|
|
1484
|
+
/**
|
|
1485
|
+
* The working directory when code coverage began. This
|
|
1486
|
+
* is useful for displaying relative path names in case
|
|
1487
|
+
* the tests changed the working directory of the Node.js process.
|
|
1488
|
+
*/
|
|
1489
|
+
workingDirectory: string;
|
|
1490
|
+
};
|
|
1491
|
+
/**
|
|
1492
|
+
* The nesting level of the test.
|
|
1493
|
+
*/
|
|
1494
|
+
nesting: number;
|
|
1495
|
+
}
|
|
1496
|
+
interface TestComplete extends TestLocationInfo {
|
|
1497
|
+
/**
|
|
1498
|
+
* Additional execution metadata.
|
|
1499
|
+
*/
|
|
1500
|
+
details: {
|
|
1501
|
+
/**
|
|
1502
|
+
* Whether the test passed or not.
|
|
1503
|
+
*/
|
|
1504
|
+
passed: boolean;
|
|
1505
|
+
/**
|
|
1506
|
+
* The duration of the test in milliseconds.
|
|
1507
|
+
*/
|
|
1508
|
+
duration_ms: number;
|
|
1509
|
+
/**
|
|
1510
|
+
* An error wrapping the error thrown by the test if it did not pass.
|
|
1511
|
+
*/
|
|
1512
|
+
error: Error;
|
|
1513
|
+
/**
|
|
1514
|
+
* The type of the test, used to denote whether this is a suite.
|
|
1515
|
+
*/
|
|
1516
|
+
type?: "suite";
|
|
1517
|
+
};
|
|
1518
|
+
/**
|
|
1519
|
+
* The test name.
|
|
1520
|
+
*/
|
|
1521
|
+
name: string;
|
|
1522
|
+
/**
|
|
1523
|
+
* The nesting level of the test.
|
|
1524
|
+
*/
|
|
1525
|
+
nesting: number;
|
|
1526
|
+
/**
|
|
1527
|
+
* The ordinal number of the test.
|
|
1528
|
+
*/
|
|
1529
|
+
testNumber: number;
|
|
1530
|
+
/**
|
|
1531
|
+
* Present if `context.todo` is called.
|
|
1532
|
+
*/
|
|
1533
|
+
todo?: string | boolean;
|
|
1534
|
+
/**
|
|
1535
|
+
* Present if `context.skip` is called.
|
|
1536
|
+
*/
|
|
1537
|
+
skip?: string | boolean;
|
|
1538
|
+
}
|
|
1539
|
+
interface TestDequeue extends TestLocationInfo {
|
|
1540
|
+
/**
|
|
1541
|
+
* The test name.
|
|
1542
|
+
*/
|
|
1543
|
+
name: string;
|
|
1544
|
+
/**
|
|
1545
|
+
* The nesting level of the test.
|
|
1546
|
+
*/
|
|
1547
|
+
nesting: number;
|
|
1548
|
+
}
|
|
1549
|
+
interface TestEnqueue extends TestLocationInfo {
|
|
1550
|
+
/**
|
|
1551
|
+
* The test name.
|
|
1552
|
+
*/
|
|
1553
|
+
name: string;
|
|
1554
|
+
/**
|
|
1555
|
+
* The nesting level of the test.
|
|
1556
|
+
*/
|
|
1557
|
+
nesting: number;
|
|
1558
|
+
}
|
|
1279
1559
|
interface TestFail extends TestLocationInfo {
|
|
1280
1560
|
/**
|
|
1281
1561
|
* Additional execution metadata.
|
|
@@ -1286,12 +1566,12 @@ interface TestFail extends TestLocationInfo {
|
|
|
1286
1566
|
*/
|
|
1287
1567
|
duration_ms: number;
|
|
1288
1568
|
/**
|
|
1289
|
-
*
|
|
1569
|
+
* An error wrapping the error thrown by the test if it did not pass.
|
|
1290
1570
|
*/
|
|
1291
1571
|
error: Error;
|
|
1292
1572
|
/**
|
|
1293
1573
|
* The type of the test, used to denote whether this is a suite.
|
|
1294
|
-
* @since
|
|
1574
|
+
* @since v20.0.0, v19.9.0, v18.17.0
|
|
1295
1575
|
*/
|
|
1296
1576
|
type?: "suite";
|
|
1297
1577
|
};
|
|
@@ -1374,36 +1654,16 @@ interface TestStart extends TestLocationInfo {
|
|
|
1374
1654
|
}
|
|
1375
1655
|
interface TestStderr extends TestLocationInfo {
|
|
1376
1656
|
/**
|
|
1377
|
-
* The message written to `stderr
|
|
1657
|
+
* The message written to `stderr`.
|
|
1378
1658
|
*/
|
|
1379
1659
|
message: string;
|
|
1380
1660
|
}
|
|
1381
1661
|
interface TestStdout extends TestLocationInfo {
|
|
1382
1662
|
/**
|
|
1383
|
-
* The message written to `stdout
|
|
1663
|
+
* The message written to `stdout`.
|
|
1384
1664
|
*/
|
|
1385
1665
|
message: string;
|
|
1386
1666
|
}
|
|
1387
|
-
interface TestEnqueue extends TestLocationInfo {
|
|
1388
|
-
/**
|
|
1389
|
-
* The test name
|
|
1390
|
-
*/
|
|
1391
|
-
name: string;
|
|
1392
|
-
/**
|
|
1393
|
-
* The nesting level of the test.
|
|
1394
|
-
*/
|
|
1395
|
-
nesting: number;
|
|
1396
|
-
}
|
|
1397
|
-
interface TestDequeue extends TestLocationInfo {
|
|
1398
|
-
/**
|
|
1399
|
-
* The test name
|
|
1400
|
-
*/
|
|
1401
|
-
name: string;
|
|
1402
|
-
/**
|
|
1403
|
-
* The nesting level of the test.
|
|
1404
|
-
*/
|
|
1405
|
-
nesting: number;
|
|
1406
|
-
}
|
|
1407
1667
|
|
|
1408
1668
|
/**
|
|
1409
1669
|
* The `node:test/reporters` module exposes the builtin-reporters for `node:test`.
|
|
@@ -1420,21 +1680,23 @@ interface TestDequeue extends TestLocationInfo {
|
|
|
1420
1680
|
* import test from 'test/reporters';
|
|
1421
1681
|
* ```
|
|
1422
1682
|
* @since v19.9.0
|
|
1423
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
1683
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/test/reporters.js)
|
|
1424
1684
|
*/
|
|
1425
1685
|
declare module "node:test/reporters" {
|
|
1426
1686
|
import { Transform, TransformOptions } from "node:stream";
|
|
1427
1687
|
|
|
1428
1688
|
type TestEvent =
|
|
1689
|
+
| { type: "test:coverage"; data: TestCoverage }
|
|
1690
|
+
| { type: "test:complete"; data: TestComplete }
|
|
1691
|
+
| { type: "test:dequeue"; data: TestDequeue }
|
|
1429
1692
|
| { type: "test:diagnostic"; data: DiagnosticData }
|
|
1693
|
+
| { type: "test:enqueue"; data: TestEnqueue }
|
|
1430
1694
|
| { type: "test:fail"; data: TestFail }
|
|
1431
1695
|
| { type: "test:pass"; data: TestPass }
|
|
1432
1696
|
| { type: "test:plan"; data: TestPlan }
|
|
1433
1697
|
| { type: "test:start"; data: TestStart }
|
|
1434
1698
|
| { type: "test:stderr"; data: TestStderr }
|
|
1435
1699
|
| { type: "test:stdout"; data: TestStdout }
|
|
1436
|
-
| { type: "test:enqueue"; data: TestEnqueue }
|
|
1437
|
-
| { type: "test:dequeue"; data: TestDequeue }
|
|
1438
1700
|
| { type: "test:watch:drained" };
|
|
1439
1701
|
type TestEventGenerator = AsyncGenerator<TestEvent, void>;
|
|
1440
1702
|
|
|
@@ -1455,9 +1717,12 @@ declare module "node:test/reporters" {
|
|
|
1455
1717
|
constructor();
|
|
1456
1718
|
}
|
|
1457
1719
|
/**
|
|
1458
|
-
* The `junit` reporter outputs test results in a jUnit XML format
|
|
1720
|
+
* The `junit` reporter outputs test results in a jUnit XML format.
|
|
1459
1721
|
*/
|
|
1460
1722
|
function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
|
|
1723
|
+
/**
|
|
1724
|
+
* The `lcov` reporter outputs test coverage when used with the [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--experimental-test-coverage) flag.
|
|
1725
|
+
*/
|
|
1461
1726
|
class Lcov extends Transform {
|
|
1462
1727
|
constructor(opts?: TransformOptions);
|
|
1463
1728
|
}
|