ibm-cloud-sdk-core 4.3.2 → 4.3.4
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/CHANGELOG.md +7 -0
- package/es/lib/sdk-test-helpers.js +1 -2
- package/iamtest.env +3 -0
- package/lib/sdk-test-helpers.js +11 -9
- package/package.json +3 -2
- package/sdk-test-utilities/node_modules/.package-lock.json +508 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/lib/index.js +156 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/package.json +30 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/identifier.js +70 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/index.js +57 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/keyword.js +35 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/package.json +31 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/lib/index.js +119 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/index.js +165 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/package.json +56 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/readme.md +147 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/index.js +228 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/index.js.flow +93 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/package.json +71 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/readme.md +314 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/templates.js +128 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/types/index.d.ts +97 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/CHANGELOG.md +54 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/README.md +68 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/conversions.js +868 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/index.js +78 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/package.json +46 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/route.js +97 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/.eslintrc.json +43 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/LICENSE +8 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/README.md +11 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/index.js +152 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/package.json +25 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/test.js +7 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js +11 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/license +21 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/package.json +41 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md +27 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/index.js +8 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/package.json +44 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/readme.md +70 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/browser.js +5 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/index.js +131 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/package.json +53 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/readme.md +66 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/package.json +30 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/README.md +5 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/immutableUtils.js +66 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/index.d.ts +94 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/index.js +34 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/jasmineUtils.js +218 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/utils.js +462 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/package.json +35 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/README.md +3 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/build/index.d.ts +63 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/build/index.js +60 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/package.json +29 -0
- package/sdk-test-utilities/node_modules/@jest/types/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/types/README.md +30 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Circus.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Config.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Global.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/TestResult.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/index.d.ts +1204 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/index.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/package.json +38 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/compiler.d.ts +35 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/compiler.js +577 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/index.d.ts +2 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/index.js +47 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/errors.d.ts +88 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/errors.js +609 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/index.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/index.js +44 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/license +23 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/package.json +47 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/readme.md +1424 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/index.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/index.js +44 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/system.d.ts +26 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/system.js +90 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/typebox.d.ts +723 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/typebox.js +2220 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/cast.d.ts +30 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/cast.js +372 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/check.d.ts +12 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/check.js +484 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/clone.d.ts +3 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/clone.js +71 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/convert.d.ts +13 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/convert.js +372 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/create.d.ts +26 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/create.js +480 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/delta.d.ts +43 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/delta.js +204 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/equal.d.ts +3 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/equal.js +80 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/hash.d.ts +8 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/hash.js +208 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/index.d.ts +6 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/index.js +56 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/is.d.ts +11 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/is.js +53 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/mutate.d.ts +13 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/mutate.js +121 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/pointer.d.ts +24 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/pointer.js +142 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/value.d.ts +39 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/value.js +99 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/index.d.ts +111 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/package.json +25 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/index.d.ts +184 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/package.json +32 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/README.md +86 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/index.d.ts +67 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/package.json +32 -0
- package/sdk-test-utilities/node_modules/@types/node/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/node/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/sdk-test-utilities/node_modules/@types/node/assert.d.ts +1040 -0
- package/sdk-test-utilities/node_modules/@types/node/async_hooks.d.ts +541 -0
- package/sdk-test-utilities/node_modules/@types/node/buffer.d.ts +2363 -0
- package/sdk-test-utilities/node_modules/@types/node/child_process.d.ts +1544 -0
- package/sdk-test-utilities/node_modules/@types/node/cluster.d.ts +578 -0
- package/sdk-test-utilities/node_modules/@types/node/console.d.ts +452 -0
- package/sdk-test-utilities/node_modules/@types/node/constants.d.ts +19 -0
- package/sdk-test-utilities/node_modules/@types/node/crypto.d.ts +4523 -0
- package/sdk-test-utilities/node_modules/@types/node/dgram.d.ts +596 -0
- package/sdk-test-utilities/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
- package/sdk-test-utilities/node_modules/@types/node/dns/promises.d.ts +474 -0
- package/sdk-test-utilities/node_modules/@types/node/dns.d.ts +864 -0
- package/sdk-test-utilities/node_modules/@types/node/dom-events.d.ts +124 -0
- package/sdk-test-utilities/node_modules/@types/node/domain.d.ts +170 -0
- package/sdk-test-utilities/node_modules/@types/node/events.d.ts +909 -0
- package/sdk-test-utilities/node_modules/@types/node/fs/promises.d.ts +1245 -0
- package/sdk-test-utilities/node_modules/@types/node/fs.d.ts +4317 -0
- package/sdk-test-utilities/node_modules/@types/node/globals.d.ts +411 -0
- package/sdk-test-utilities/node_modules/@types/node/globals.global.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@types/node/http.d.ts +1908 -0
- package/sdk-test-utilities/node_modules/@types/node/http2.d.ts +2418 -0
- package/sdk-test-utilities/node_modules/@types/node/https.d.ts +550 -0
- package/sdk-test-utilities/node_modules/@types/node/index.d.ts +89 -0
- package/sdk-test-utilities/node_modules/@types/node/inspector.d.ts +2746 -0
- package/sdk-test-utilities/node_modules/@types/node/module.d.ts +315 -0
- package/sdk-test-utilities/node_modules/@types/node/net.d.ts +999 -0
- package/sdk-test-utilities/node_modules/@types/node/os.d.ts +495 -0
- package/sdk-test-utilities/node_modules/@types/node/package.json +217 -0
- package/sdk-test-utilities/node_modules/@types/node/path.d.ts +191 -0
- package/sdk-test-utilities/node_modules/@types/node/perf_hooks.d.ts +905 -0
- package/sdk-test-utilities/node_modules/@types/node/process.d.ts +1754 -0
- package/sdk-test-utilities/node_modules/@types/node/punycode.d.ts +117 -0
- package/sdk-test-utilities/node_modules/@types/node/querystring.d.ts +153 -0
- package/sdk-test-utilities/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/sdk-test-utilities/node_modules/@types/node/readline.d.ts +540 -0
- package/sdk-test-utilities/node_modules/@types/node/repl.d.ts +430 -0
- package/sdk-test-utilities/node_modules/@types/node/sea.d.ts +153 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/web.d.ts +367 -0
- package/sdk-test-utilities/node_modules/@types/node/stream.d.ts +1707 -0
- package/sdk-test-utilities/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/sdk-test-utilities/node_modules/@types/node/test.d.ts +1718 -0
- package/sdk-test-utilities/node_modules/@types/node/timers/promises.d.ts +97 -0
- package/sdk-test-utilities/node_modules/@types/node/timers.d.ts +240 -0
- package/sdk-test-utilities/node_modules/@types/node/tls.d.ts +1217 -0
- package/sdk-test-utilities/node_modules/@types/node/trace_events.d.ts +197 -0
- package/sdk-test-utilities/node_modules/@types/node/tty.d.ts +208 -0
- package/sdk-test-utilities/node_modules/@types/node/url.d.ts +952 -0
- package/sdk-test-utilities/node_modules/@types/node/util.d.ts +2292 -0
- package/sdk-test-utilities/node_modules/@types/node/v8.d.ts +808 -0
- package/sdk-test-utilities/node_modules/@types/node/vm.d.ts +924 -0
- package/sdk-test-utilities/node_modules/@types/node/wasi.d.ts +181 -0
- package/sdk-test-utilities/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/sdk-test-utilities/node_modules/@types/node/zlib.d.ts +530 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/README.md +78 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/index.d.ts +59 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/package.json +25 -0
- package/sdk-test-utilities/node_modules/@types/yargs/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/yargs/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/yargs/helpers.d.mts +1 -0
- package/sdk-test-utilities/node_modules/@types/yargs/helpers.d.ts +5 -0
- package/sdk-test-utilities/node_modules/@types/yargs/index.d.mts +46 -0
- package/sdk-test-utilities/node_modules/@types/yargs/index.d.ts +1031 -0
- package/sdk-test-utilities/node_modules/@types/yargs/package.json +87 -0
- package/sdk-test-utilities/node_modules/@types/yargs/yargs.d.ts +9 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/index.d.ts +112 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/package.json +25 -0
- package/sdk-test-utilities/node_modules/ansi-styles/index.d.ts +345 -0
- package/sdk-test-utilities/node_modules/ansi-styles/index.js +163 -0
- package/sdk-test-utilities/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/ansi-styles/package.json +56 -0
- package/sdk-test-utilities/node_modules/ansi-styles/readme.md +152 -0
- package/sdk-test-utilities/node_modules/braces/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/braces/README.md +586 -0
- package/sdk-test-utilities/node_modules/braces/index.js +170 -0
- package/sdk-test-utilities/node_modules/braces/lib/compile.js +60 -0
- package/sdk-test-utilities/node_modules/braces/lib/constants.js +57 -0
- package/sdk-test-utilities/node_modules/braces/lib/expand.js +113 -0
- package/sdk-test-utilities/node_modules/braces/lib/parse.js +331 -0
- package/sdk-test-utilities/node_modules/braces/lib/stringify.js +32 -0
- package/sdk-test-utilities/node_modules/braces/lib/utils.js +122 -0
- package/sdk-test-utilities/node_modules/braces/package.json +77 -0
- package/sdk-test-utilities/node_modules/chalk/index.d.ts +415 -0
- package/sdk-test-utilities/node_modules/chalk/license +9 -0
- package/sdk-test-utilities/node_modules/chalk/package.json +68 -0
- package/sdk-test-utilities/node_modules/chalk/readme.md +341 -0
- package/sdk-test-utilities/node_modules/chalk/source/index.js +229 -0
- package/sdk-test-utilities/node_modules/chalk/source/templates.js +134 -0
- package/sdk-test-utilities/node_modules/chalk/source/util.js +39 -0
- package/sdk-test-utilities/node_modules/ci-info/CHANGELOG.md +178 -0
- package/sdk-test-utilities/node_modules/ci-info/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/ci-info/README.md +135 -0
- package/sdk-test-utilities/node_modules/ci-info/index.d.ts +75 -0
- package/sdk-test-utilities/node_modules/ci-info/index.js +90 -0
- package/sdk-test-utilities/node_modules/ci-info/package.json +45 -0
- package/sdk-test-utilities/node_modules/ci-info/vendors.json +321 -0
- package/sdk-test-utilities/node_modules/color-convert/CHANGELOG.md +54 -0
- package/sdk-test-utilities/node_modules/color-convert/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/color-convert/README.md +68 -0
- package/sdk-test-utilities/node_modules/color-convert/conversions.js +839 -0
- package/sdk-test-utilities/node_modules/color-convert/index.js +81 -0
- package/sdk-test-utilities/node_modules/color-convert/package.json +48 -0
- package/sdk-test-utilities/node_modules/color-convert/route.js +97 -0
- package/sdk-test-utilities/node_modules/color-name/LICENSE +8 -0
- package/sdk-test-utilities/node_modules/color-name/README.md +11 -0
- package/sdk-test-utilities/node_modules/color-name/index.js +152 -0
- package/sdk-test-utilities/node_modules/color-name/package.json +28 -0
- package/sdk-test-utilities/node_modules/diff-sequences/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/diff-sequences/README.md +404 -0
- package/sdk-test-utilities/node_modules/diff-sequences/build/index.d.ts +38 -0
- package/sdk-test-utilities/node_modules/diff-sequences/build/index.js +798 -0
- package/sdk-test-utilities/node_modules/diff-sequences/package.json +39 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/index.js +11 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/license +9 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/package.json +43 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/readme.md +29 -0
- package/sdk-test-utilities/node_modules/expect/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/expect/README.md +3 -0
- package/sdk-test-utilities/node_modules/expect/build/asymmetricMatchers.js +375 -0
- package/sdk-test-utilities/node_modules/expect/build/extractExpectedAssertionsErrors.js +86 -0
- package/sdk-test-utilities/node_modules/expect/build/index.d.ts +370 -0
- package/sdk-test-utilities/node_modules/expect/build/index.js +410 -0
- package/sdk-test-utilities/node_modules/expect/build/jestMatchersObject.js +123 -0
- package/sdk-test-utilities/node_modules/expect/build/matchers.js +1292 -0
- package/sdk-test-utilities/node_modules/expect/build/print.js +122 -0
- package/sdk-test-utilities/node_modules/expect/build/spyMatchers.js +1254 -0
- package/sdk-test-utilities/node_modules/expect/build/toThrowMatchers.js +481 -0
- package/sdk-test-utilities/node_modules/expect/build/types.js +3 -0
- package/sdk-test-utilities/node_modules/expect/package.json +43 -0
- package/sdk-test-utilities/node_modules/fill-range/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/fill-range/README.md +237 -0
- package/sdk-test-utilities/node_modules/fill-range/index.js +248 -0
- package/sdk-test-utilities/node_modules/fill-range/package.json +74 -0
- package/sdk-test-utilities/node_modules/graceful-fs/LICENSE +15 -0
- package/sdk-test-utilities/node_modules/graceful-fs/README.md +143 -0
- package/sdk-test-utilities/node_modules/graceful-fs/clone.js +23 -0
- package/sdk-test-utilities/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/sdk-test-utilities/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/sdk-test-utilities/node_modules/graceful-fs/package.json +53 -0
- package/sdk-test-utilities/node_modules/graceful-fs/polyfills.js +355 -0
- package/sdk-test-utilities/node_modules/has-flag/index.d.ts +39 -0
- package/sdk-test-utilities/node_modules/has-flag/index.js +8 -0
- package/sdk-test-utilities/node_modules/has-flag/license +9 -0
- package/sdk-test-utilities/node_modules/has-flag/package.json +46 -0
- package/sdk-test-utilities/node_modules/has-flag/readme.md +89 -0
- package/sdk-test-utilities/node_modules/is-number/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/is-number/README.md +187 -0
- package/sdk-test-utilities/node_modules/is-number/index.js +18 -0
- package/sdk-test-utilities/node_modules/is-number/package.json +82 -0
- package/sdk-test-utilities/node_modules/jest-diff/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-diff/README.md +671 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/cleanupSemantic.js +599 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/constants.js +19 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/diffLines.js +193 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/diffStrings.js +66 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/getAlignedDiffs.js +223 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/index.d.ts +93 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/index.js +232 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/joinAlignedDiffs.js +271 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/normalizeDiffOptions.js +59 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/printDiffs.js +79 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/jest-diff/package.json +36 -0
- package/sdk-test-utilities/node_modules/jest-get-type/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-get-type/build/index.d.ts +27 -0
- package/sdk-test-utilities/node_modules/jest-get-type/build/index.js +53 -0
- package/sdk-test-utilities/node_modules/jest-get-type/package.json +27 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/README.md +24 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/Replaceable.js +64 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/deepCyclicCopyReplaceable.js +111 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/index.d.ts +138 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/index.js +542 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/package.json +37 -0
- package/sdk-test-utilities/node_modules/jest-message-util/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/index.d.ts +68 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/index.js +518 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/jest-message-util/package.json +43 -0
- package/sdk-test-utilities/node_modules/jest-util/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-util/Readme.md +87 -0
- package/sdk-test-utilities/node_modules/jest-util/build/ErrorWithStack.js +28 -0
- package/sdk-test-utilities/node_modules/jest-util/build/clearLine.js +18 -0
- package/sdk-test-utilities/node_modules/jest-util/build/convertDescriptorToString.js +30 -0
- package/sdk-test-utilities/node_modules/jest-util/build/createDirectory.js +71 -0
- package/sdk-test-utilities/node_modules/jest-util/build/createProcessObject.js +109 -0
- package/sdk-test-utilities/node_modules/jest-util/build/deepCyclicCopy.js +76 -0
- package/sdk-test-utilities/node_modules/jest-util/build/formatTime.js +24 -0
- package/sdk-test-utilities/node_modules/jest-util/build/globsToMatcher.js +98 -0
- package/sdk-test-utilities/node_modules/jest-util/build/index.d.ts +136 -0
- package/sdk-test-utilities/node_modules/jest-util/build/index.js +199 -0
- package/sdk-test-utilities/node_modules/jest-util/build/installCommonGlobals.js +115 -0
- package/sdk-test-utilities/node_modules/jest-util/build/interopRequireDefault.js +22 -0
- package/sdk-test-utilities/node_modules/jest-util/build/invariant.js +18 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isInteractive.js +22 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isNonNullable.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isPromise.js +20 -0
- package/sdk-test-utilities/node_modules/jest-util/build/pluralize.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/preRunMessage.js +38 -0
- package/sdk-test-utilities/node_modules/jest-util/build/replacePathSepForGlob.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/requireOrImportModule.js +77 -0
- package/sdk-test-utilities/node_modules/jest-util/build/setGlobal.js +17 -0
- package/sdk-test-utilities/node_modules/jest-util/build/specialChars.js +25 -0
- package/sdk-test-utilities/node_modules/jest-util/build/testPathPatternToRegExp.js +19 -0
- package/sdk-test-utilities/node_modules/jest-util/build/tryRealpath.js +30 -0
- package/sdk-test-utilities/node_modules/jest-util/package.json +38 -0
- package/sdk-test-utilities/node_modules/js-tokens/CHANGELOG.md +151 -0
- package/sdk-test-utilities/node_modules/js-tokens/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/js-tokens/README.md +240 -0
- package/sdk-test-utilities/node_modules/js-tokens/index.js +23 -0
- package/sdk-test-utilities/node_modules/js-tokens/package.json +30 -0
- package/sdk-test-utilities/node_modules/micromatch/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/micromatch/README.md +1017 -0
- package/sdk-test-utilities/node_modules/micromatch/index.js +467 -0
- package/sdk-test-utilities/node_modules/micromatch/package.json +101 -0
- package/sdk-test-utilities/node_modules/picocolors/LICENSE +15 -0
- package/sdk-test-utilities/node_modules/picocolors/README.md +21 -0
- package/sdk-test-utilities/node_modules/picocolors/package.json +25 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.browser.js +4 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.d.ts +5 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.js +65 -0
- package/sdk-test-utilities/node_modules/picomatch/CHANGELOG.md +136 -0
- package/sdk-test-utilities/node_modules/picomatch/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/picomatch/README.md +708 -0
- package/sdk-test-utilities/node_modules/picomatch/index.js +3 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/constants.js +179 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/parse.js +1091 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/picomatch.js +342 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/scan.js +391 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/utils.js +64 -0
- package/sdk-test-utilities/node_modules/picomatch/package.json +81 -0
- package/sdk-test-utilities/node_modules/pretty-format/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/pretty-format/README.md +463 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/collections.js +180 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/index.d.ts +163 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/index.js +478 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js +89 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/DOMCollection.js +67 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/DOMElement.js +101 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/Immutable.js +217 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/ReactElement.js +143 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/ReactTestComponent.js +66 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/lib/escapeHTML.js +16 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/lib/markup.js +113 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/index.d.ts +167 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/index.js +164 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/package.json +52 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/readme.md +144 -0
- package/sdk-test-utilities/node_modules/pretty-format/package.json +43 -0
- package/sdk-test-utilities/node_modules/react-is/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/react-is/README.md +104 -0
- package/sdk-test-utilities/node_modules/react-is/cjs/react-is.development.js +221 -0
- package/sdk-test-utilities/node_modules/react-is/cjs/react-is.production.min.js +14 -0
- package/sdk-test-utilities/node_modules/react-is/index.js +7 -0
- package/sdk-test-utilities/node_modules/react-is/package.json +26 -0
- package/sdk-test-utilities/node_modules/react-is/umd/react-is.development.js +220 -0
- package/sdk-test-utilities/node_modules/react-is/umd/react-is.production.min.js +15 -0
- package/sdk-test-utilities/node_modules/slash/index.d.ts +25 -0
- package/sdk-test-utilities/node_modules/slash/index.js +11 -0
- package/sdk-test-utilities/node_modules/slash/license +9 -0
- package/sdk-test-utilities/node_modules/slash/package.json +35 -0
- package/sdk-test-utilities/node_modules/slash/readme.md +44 -0
- package/sdk-test-utilities/node_modules/stack-utils/LICENSE.md +21 -0
- package/sdk-test-utilities/node_modules/stack-utils/index.js +344 -0
- package/sdk-test-utilities/node_modules/stack-utils/package.json +39 -0
- package/sdk-test-utilities/node_modules/stack-utils/readme.md +143 -0
- package/sdk-test-utilities/node_modules/supports-color/browser.js +5 -0
- package/sdk-test-utilities/node_modules/supports-color/index.js +135 -0
- package/sdk-test-utilities/node_modules/supports-color/license +9 -0
- package/sdk-test-utilities/node_modules/supports-color/package.json +53 -0
- package/sdk-test-utilities/node_modules/supports-color/readme.md +76 -0
- package/sdk-test-utilities/node_modules/to-regex-range/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/to-regex-range/README.md +305 -0
- package/sdk-test-utilities/node_modules/to-regex-range/index.js +288 -0
- package/sdk-test-utilities/node_modules/to-regex-range/package.json +88 -0
- package/sdk-test-utilities/node_modules/undici-types/README.md +6 -0
- package/sdk-test-utilities/node_modules/undici-types/agent.d.ts +31 -0
- package/sdk-test-utilities/node_modules/undici-types/api.d.ts +43 -0
- package/sdk-test-utilities/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/sdk-test-utilities/node_modules/undici-types/cache.d.ts +36 -0
- package/sdk-test-utilities/node_modules/undici-types/client.d.ts +97 -0
- package/sdk-test-utilities/node_modules/undici-types/connector.d.ts +34 -0
- package/sdk-test-utilities/node_modules/undici-types/content-type.d.ts +21 -0
- package/sdk-test-utilities/node_modules/undici-types/cookies.d.ts +28 -0
- package/sdk-test-utilities/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/sdk-test-utilities/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/sdk-test-utilities/node_modules/undici-types/errors.d.ts +128 -0
- package/sdk-test-utilities/node_modules/undici-types/fetch.d.ts +209 -0
- package/sdk-test-utilities/node_modules/undici-types/file.d.ts +39 -0
- package/sdk-test-utilities/node_modules/undici-types/filereader.d.ts +54 -0
- package/sdk-test-utilities/node_modules/undici-types/formdata.d.ts +108 -0
- package/sdk-test-utilities/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/sdk-test-utilities/node_modules/undici-types/global-origin.d.ts +7 -0
- package/sdk-test-utilities/node_modules/undici-types/handlers.d.ts +9 -0
- package/sdk-test-utilities/node_modules/undici-types/header.d.ts +4 -0
- package/sdk-test-utilities/node_modules/undici-types/index.d.ts +63 -0
- package/sdk-test-utilities/node_modules/undici-types/interceptors.d.ts +5 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-client.d.ts +25 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/sdk-test-utilities/node_modules/undici-types/package.json +55 -0
- package/sdk-test-utilities/node_modules/undici-types/patch.d.ts +71 -0
- package/sdk-test-utilities/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/sdk-test-utilities/node_modules/undici-types/pool.d.ts +28 -0
- package/sdk-test-utilities/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/sdk-test-utilities/node_modules/undici-types/readable.d.ts +61 -0
- package/sdk-test-utilities/node_modules/undici-types/webidl.d.ts +220 -0
- package/sdk-test-utilities/node_modules/undici-types/websocket.d.ts +131 -0
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.createMatcher = void 0;
|
|
7
|
+
var _expectUtils = require('@jest/expect-utils');
|
|
8
|
+
var _jestMatcherUtils = require('jest-matcher-utils');
|
|
9
|
+
var _jestMessageUtil = require('jest-message-util');
|
|
10
|
+
var _print = require('./print');
|
|
11
|
+
/**
|
|
12
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the MIT license found in the
|
|
15
|
+
* LICENSE file in the root directory of this source tree.
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/* eslint-disable local/ban-types-eventually */
|
|
20
|
+
|
|
21
|
+
const DID_NOT_THROW = 'Received function did not throw';
|
|
22
|
+
const getThrown = e => {
|
|
23
|
+
const hasMessage =
|
|
24
|
+
e !== null && e !== undefined && typeof e.message === 'string';
|
|
25
|
+
if (hasMessage && typeof e.name === 'string' && typeof e.stack === 'string') {
|
|
26
|
+
return {
|
|
27
|
+
hasMessage,
|
|
28
|
+
isError: true,
|
|
29
|
+
message: e.message,
|
|
30
|
+
value: e
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
hasMessage,
|
|
35
|
+
isError: false,
|
|
36
|
+
message: hasMessage ? e.message : String(e),
|
|
37
|
+
value: e
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
const createMatcher = (matcherName, fromPromise) =>
|
|
41
|
+
function (received, expected) {
|
|
42
|
+
const options = {
|
|
43
|
+
isNot: this.isNot,
|
|
44
|
+
promise: this.promise
|
|
45
|
+
};
|
|
46
|
+
let thrown = null;
|
|
47
|
+
if (fromPromise && (0, _expectUtils.isError)(received)) {
|
|
48
|
+
thrown = getThrown(received);
|
|
49
|
+
} else {
|
|
50
|
+
if (typeof received !== 'function') {
|
|
51
|
+
if (!fromPromise) {
|
|
52
|
+
const placeholder = expected === undefined ? '' : 'expected';
|
|
53
|
+
throw new Error(
|
|
54
|
+
(0, _jestMatcherUtils.matcherErrorMessage)(
|
|
55
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
56
|
+
matcherName,
|
|
57
|
+
undefined,
|
|
58
|
+
placeholder,
|
|
59
|
+
options
|
|
60
|
+
),
|
|
61
|
+
`${(0, _jestMatcherUtils.RECEIVED_COLOR)(
|
|
62
|
+
'received'
|
|
63
|
+
)} value must be a function`,
|
|
64
|
+
(0, _jestMatcherUtils.printWithType)(
|
|
65
|
+
'Received',
|
|
66
|
+
received,
|
|
67
|
+
_jestMatcherUtils.printReceived
|
|
68
|
+
)
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
try {
|
|
74
|
+
received();
|
|
75
|
+
} catch (e) {
|
|
76
|
+
thrown = getThrown(e);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (expected === undefined) {
|
|
81
|
+
return toThrow(matcherName, options, thrown);
|
|
82
|
+
} else if (typeof expected === 'function') {
|
|
83
|
+
return toThrowExpectedClass(matcherName, options, thrown, expected);
|
|
84
|
+
} else if (typeof expected === 'string') {
|
|
85
|
+
return toThrowExpectedString(matcherName, options, thrown, expected);
|
|
86
|
+
} else if (expected !== null && typeof expected.test === 'function') {
|
|
87
|
+
return toThrowExpectedRegExp(matcherName, options, thrown, expected);
|
|
88
|
+
} else if (
|
|
89
|
+
expected !== null &&
|
|
90
|
+
typeof expected.asymmetricMatch === 'function'
|
|
91
|
+
) {
|
|
92
|
+
return toThrowExpectedAsymmetric(matcherName, options, thrown, expected);
|
|
93
|
+
} else if (expected !== null && typeof expected === 'object') {
|
|
94
|
+
return toThrowExpectedObject(matcherName, options, thrown, expected);
|
|
95
|
+
} else {
|
|
96
|
+
throw new Error(
|
|
97
|
+
(0, _jestMatcherUtils.matcherErrorMessage)(
|
|
98
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
99
|
+
matcherName,
|
|
100
|
+
undefined,
|
|
101
|
+
undefined,
|
|
102
|
+
options
|
|
103
|
+
),
|
|
104
|
+
`${(0, _jestMatcherUtils.EXPECTED_COLOR)(
|
|
105
|
+
'expected'
|
|
106
|
+
)} value must be a string or regular expression or class or error`,
|
|
107
|
+
(0, _jestMatcherUtils.printWithType)(
|
|
108
|
+
'Expected',
|
|
109
|
+
expected,
|
|
110
|
+
_jestMatcherUtils.printExpected
|
|
111
|
+
)
|
|
112
|
+
)
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
exports.createMatcher = createMatcher;
|
|
117
|
+
const matchers = {
|
|
118
|
+
toThrow: createMatcher('toThrow'),
|
|
119
|
+
toThrowError: createMatcher('toThrowError')
|
|
120
|
+
};
|
|
121
|
+
const toThrowExpectedRegExp = (matcherName, options, thrown, expected) => {
|
|
122
|
+
const pass = thrown !== null && expected.test(thrown.message);
|
|
123
|
+
const message = pass
|
|
124
|
+
? () =>
|
|
125
|
+
// eslint-disable-next-line prefer-template
|
|
126
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
127
|
+
matcherName,
|
|
128
|
+
undefined,
|
|
129
|
+
undefined,
|
|
130
|
+
options
|
|
131
|
+
) +
|
|
132
|
+
'\n\n' +
|
|
133
|
+
formatExpected('Expected pattern: not ', expected) +
|
|
134
|
+
(thrown !== null && thrown.hasMessage
|
|
135
|
+
? formatReceived(
|
|
136
|
+
'Received message: ',
|
|
137
|
+
thrown,
|
|
138
|
+
'message',
|
|
139
|
+
expected
|
|
140
|
+
) + formatStack(thrown)
|
|
141
|
+
: formatReceived('Received value: ', thrown, 'value'))
|
|
142
|
+
: () =>
|
|
143
|
+
// eslint-disable-next-line prefer-template
|
|
144
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
145
|
+
matcherName,
|
|
146
|
+
undefined,
|
|
147
|
+
undefined,
|
|
148
|
+
options
|
|
149
|
+
) +
|
|
150
|
+
'\n\n' +
|
|
151
|
+
formatExpected('Expected pattern: ', expected) +
|
|
152
|
+
(thrown === null
|
|
153
|
+
? `\n${DID_NOT_THROW}`
|
|
154
|
+
: thrown.hasMessage
|
|
155
|
+
? formatReceived('Received message: ', thrown, 'message') +
|
|
156
|
+
formatStack(thrown)
|
|
157
|
+
: formatReceived('Received value: ', thrown, 'value'));
|
|
158
|
+
return {
|
|
159
|
+
message,
|
|
160
|
+
pass
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
const toThrowExpectedAsymmetric = (matcherName, options, thrown, expected) => {
|
|
164
|
+
const pass = thrown !== null && expected.asymmetricMatch(thrown.value);
|
|
165
|
+
const message = pass
|
|
166
|
+
? () =>
|
|
167
|
+
// eslint-disable-next-line prefer-template
|
|
168
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
169
|
+
matcherName,
|
|
170
|
+
undefined,
|
|
171
|
+
undefined,
|
|
172
|
+
options
|
|
173
|
+
) +
|
|
174
|
+
'\n\n' +
|
|
175
|
+
formatExpected('Expected asymmetric matcher: not ', expected) +
|
|
176
|
+
'\n' +
|
|
177
|
+
(thrown !== null && thrown.hasMessage
|
|
178
|
+
? formatReceived('Received name: ', thrown, 'name') +
|
|
179
|
+
formatReceived('Received message: ', thrown, 'message') +
|
|
180
|
+
formatStack(thrown)
|
|
181
|
+
: formatReceived('Thrown value: ', thrown, 'value'))
|
|
182
|
+
: () =>
|
|
183
|
+
// eslint-disable-next-line prefer-template
|
|
184
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
185
|
+
matcherName,
|
|
186
|
+
undefined,
|
|
187
|
+
undefined,
|
|
188
|
+
options
|
|
189
|
+
) +
|
|
190
|
+
'\n\n' +
|
|
191
|
+
formatExpected('Expected asymmetric matcher: ', expected) +
|
|
192
|
+
'\n' +
|
|
193
|
+
(thrown === null
|
|
194
|
+
? DID_NOT_THROW
|
|
195
|
+
: thrown.hasMessage
|
|
196
|
+
? formatReceived('Received name: ', thrown, 'name') +
|
|
197
|
+
formatReceived('Received message: ', thrown, 'message') +
|
|
198
|
+
formatStack(thrown)
|
|
199
|
+
: formatReceived('Thrown value: ', thrown, 'value'));
|
|
200
|
+
return {
|
|
201
|
+
message,
|
|
202
|
+
pass
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
const toThrowExpectedObject = (matcherName, options, thrown, expected) => {
|
|
206
|
+
const expectedMessageAndCause = createMessageAndCause(expected);
|
|
207
|
+
const thrownMessageAndCause =
|
|
208
|
+
thrown !== null ? createMessageAndCause(thrown.value) : null;
|
|
209
|
+
const pass =
|
|
210
|
+
thrown !== null &&
|
|
211
|
+
thrown.message === expected.message &&
|
|
212
|
+
thrownMessageAndCause === expectedMessageAndCause;
|
|
213
|
+
const message = pass
|
|
214
|
+
? () =>
|
|
215
|
+
// eslint-disable-next-line prefer-template
|
|
216
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
217
|
+
matcherName,
|
|
218
|
+
undefined,
|
|
219
|
+
undefined,
|
|
220
|
+
options
|
|
221
|
+
) +
|
|
222
|
+
'\n\n' +
|
|
223
|
+
formatExpected(
|
|
224
|
+
`Expected ${messageAndCause(expected)}: not `,
|
|
225
|
+
expectedMessageAndCause
|
|
226
|
+
) +
|
|
227
|
+
(thrown !== null && thrown.hasMessage
|
|
228
|
+
? formatStack(thrown)
|
|
229
|
+
: formatReceived('Received value: ', thrown, 'value'))
|
|
230
|
+
: () =>
|
|
231
|
+
// eslint-disable-next-line prefer-template
|
|
232
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
233
|
+
matcherName,
|
|
234
|
+
undefined,
|
|
235
|
+
undefined,
|
|
236
|
+
options
|
|
237
|
+
) +
|
|
238
|
+
'\n\n' +
|
|
239
|
+
(thrown === null
|
|
240
|
+
? // eslint-disable-next-line prefer-template
|
|
241
|
+
formatExpected(
|
|
242
|
+
`Expected ${messageAndCause(expected)}: `,
|
|
243
|
+
expectedMessageAndCause
|
|
244
|
+
) +
|
|
245
|
+
'\n' +
|
|
246
|
+
DID_NOT_THROW
|
|
247
|
+
: thrown.hasMessage
|
|
248
|
+
? // eslint-disable-next-line prefer-template
|
|
249
|
+
(0, _jestMatcherUtils.printDiffOrStringify)(
|
|
250
|
+
expectedMessageAndCause,
|
|
251
|
+
thrownMessageAndCause,
|
|
252
|
+
`Expected ${messageAndCause(expected)}`,
|
|
253
|
+
`Received ${messageAndCause(thrown.value)}`,
|
|
254
|
+
true
|
|
255
|
+
) +
|
|
256
|
+
'\n' +
|
|
257
|
+
formatStack(thrown)
|
|
258
|
+
: formatExpected(
|
|
259
|
+
`Expected ${messageAndCause(expected)}: `,
|
|
260
|
+
expectedMessageAndCause
|
|
261
|
+
) + formatReceived('Received value: ', thrown, 'value'));
|
|
262
|
+
return {
|
|
263
|
+
message,
|
|
264
|
+
pass
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
const toThrowExpectedClass = (matcherName, options, thrown, expected) => {
|
|
268
|
+
const pass = thrown !== null && thrown.value instanceof expected;
|
|
269
|
+
const message = pass
|
|
270
|
+
? () =>
|
|
271
|
+
// eslint-disable-next-line prefer-template
|
|
272
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
273
|
+
matcherName,
|
|
274
|
+
undefined,
|
|
275
|
+
undefined,
|
|
276
|
+
options
|
|
277
|
+
) +
|
|
278
|
+
'\n\n' +
|
|
279
|
+
(0, _print.printExpectedConstructorNameNot)(
|
|
280
|
+
'Expected constructor',
|
|
281
|
+
expected
|
|
282
|
+
) +
|
|
283
|
+
(thrown !== null &&
|
|
284
|
+
thrown.value != null &&
|
|
285
|
+
typeof thrown.value.constructor === 'function' &&
|
|
286
|
+
thrown.value.constructor !== expected
|
|
287
|
+
? (0, _print.printReceivedConstructorNameNot)(
|
|
288
|
+
'Received constructor',
|
|
289
|
+
thrown.value.constructor,
|
|
290
|
+
expected
|
|
291
|
+
)
|
|
292
|
+
: '') +
|
|
293
|
+
'\n' +
|
|
294
|
+
(thrown !== null && thrown.hasMessage
|
|
295
|
+
? formatReceived('Received message: ', thrown, 'message') +
|
|
296
|
+
formatStack(thrown)
|
|
297
|
+
: formatReceived('Received value: ', thrown, 'value'))
|
|
298
|
+
: () =>
|
|
299
|
+
// eslint-disable-next-line prefer-template
|
|
300
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
301
|
+
matcherName,
|
|
302
|
+
undefined,
|
|
303
|
+
undefined,
|
|
304
|
+
options
|
|
305
|
+
) +
|
|
306
|
+
'\n\n' +
|
|
307
|
+
(0, _print.printExpectedConstructorName)(
|
|
308
|
+
'Expected constructor',
|
|
309
|
+
expected
|
|
310
|
+
) +
|
|
311
|
+
(thrown === null
|
|
312
|
+
? `\n${DID_NOT_THROW}`
|
|
313
|
+
: `${
|
|
314
|
+
thrown.value != null &&
|
|
315
|
+
typeof thrown.value.constructor === 'function'
|
|
316
|
+
? (0, _print.printReceivedConstructorName)(
|
|
317
|
+
'Received constructor',
|
|
318
|
+
thrown.value.constructor
|
|
319
|
+
)
|
|
320
|
+
: ''
|
|
321
|
+
}\n${
|
|
322
|
+
thrown.hasMessage
|
|
323
|
+
? formatReceived('Received message: ', thrown, 'message') +
|
|
324
|
+
formatStack(thrown)
|
|
325
|
+
: formatReceived('Received value: ', thrown, 'value')
|
|
326
|
+
}`);
|
|
327
|
+
return {
|
|
328
|
+
message,
|
|
329
|
+
pass
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
const toThrowExpectedString = (matcherName, options, thrown, expected) => {
|
|
333
|
+
const pass = thrown !== null && thrown.message.includes(expected);
|
|
334
|
+
const message = pass
|
|
335
|
+
? () =>
|
|
336
|
+
// eslint-disable-next-line prefer-template
|
|
337
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
338
|
+
matcherName,
|
|
339
|
+
undefined,
|
|
340
|
+
undefined,
|
|
341
|
+
options
|
|
342
|
+
) +
|
|
343
|
+
'\n\n' +
|
|
344
|
+
formatExpected('Expected substring: not ', expected) +
|
|
345
|
+
(thrown !== null && thrown.hasMessage
|
|
346
|
+
? formatReceived(
|
|
347
|
+
'Received message: ',
|
|
348
|
+
thrown,
|
|
349
|
+
'message',
|
|
350
|
+
expected
|
|
351
|
+
) + formatStack(thrown)
|
|
352
|
+
: formatReceived('Received value: ', thrown, 'value'))
|
|
353
|
+
: () =>
|
|
354
|
+
// eslint-disable-next-line prefer-template
|
|
355
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
356
|
+
matcherName,
|
|
357
|
+
undefined,
|
|
358
|
+
undefined,
|
|
359
|
+
options
|
|
360
|
+
) +
|
|
361
|
+
'\n\n' +
|
|
362
|
+
formatExpected('Expected substring: ', expected) +
|
|
363
|
+
(thrown === null
|
|
364
|
+
? `\n${DID_NOT_THROW}`
|
|
365
|
+
: thrown.hasMessage
|
|
366
|
+
? formatReceived('Received message: ', thrown, 'message') +
|
|
367
|
+
formatStack(thrown)
|
|
368
|
+
: formatReceived('Received value: ', thrown, 'value'));
|
|
369
|
+
return {
|
|
370
|
+
message,
|
|
371
|
+
pass
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
const toThrow = (matcherName, options, thrown) => {
|
|
375
|
+
const pass = thrown !== null;
|
|
376
|
+
const message = pass
|
|
377
|
+
? () =>
|
|
378
|
+
// eslint-disable-next-line prefer-template
|
|
379
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
380
|
+
matcherName,
|
|
381
|
+
undefined,
|
|
382
|
+
'',
|
|
383
|
+
options
|
|
384
|
+
) +
|
|
385
|
+
'\n\n' +
|
|
386
|
+
(thrown !== null && thrown.hasMessage
|
|
387
|
+
? formatReceived('Error name: ', thrown, 'name') +
|
|
388
|
+
formatReceived('Error message: ', thrown, 'message') +
|
|
389
|
+
formatStack(thrown)
|
|
390
|
+
: formatReceived('Thrown value: ', thrown, 'value'))
|
|
391
|
+
: () =>
|
|
392
|
+
// eslint-disable-next-line prefer-template
|
|
393
|
+
(0, _jestMatcherUtils.matcherHint)(
|
|
394
|
+
matcherName,
|
|
395
|
+
undefined,
|
|
396
|
+
'',
|
|
397
|
+
options
|
|
398
|
+
) +
|
|
399
|
+
'\n\n' +
|
|
400
|
+
DID_NOT_THROW;
|
|
401
|
+
return {
|
|
402
|
+
message,
|
|
403
|
+
pass
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
const formatExpected = (label, expected) =>
|
|
407
|
+
`${label + (0, _jestMatcherUtils.printExpected)(expected)}\n`;
|
|
408
|
+
const formatReceived = (label, thrown, key, expected) => {
|
|
409
|
+
if (thrown === null) {
|
|
410
|
+
return '';
|
|
411
|
+
}
|
|
412
|
+
if (key === 'message') {
|
|
413
|
+
const message = thrown.message;
|
|
414
|
+
if (typeof expected === 'string') {
|
|
415
|
+
const index = message.indexOf(expected);
|
|
416
|
+
if (index !== -1) {
|
|
417
|
+
return `${
|
|
418
|
+
label +
|
|
419
|
+
(0, _print.printReceivedStringContainExpectedSubstring)(
|
|
420
|
+
message,
|
|
421
|
+
index,
|
|
422
|
+
expected.length
|
|
423
|
+
)
|
|
424
|
+
}\n`;
|
|
425
|
+
}
|
|
426
|
+
} else if (expected instanceof RegExp) {
|
|
427
|
+
return `${
|
|
428
|
+
label +
|
|
429
|
+
(0, _print.printReceivedStringContainExpectedResult)(
|
|
430
|
+
message,
|
|
431
|
+
typeof expected.exec === 'function' ? expected.exec(message) : null
|
|
432
|
+
)
|
|
433
|
+
}\n`;
|
|
434
|
+
}
|
|
435
|
+
return `${label + (0, _jestMatcherUtils.printReceived)(message)}\n`;
|
|
436
|
+
}
|
|
437
|
+
if (key === 'name') {
|
|
438
|
+
return thrown.isError
|
|
439
|
+
? `${label + (0, _jestMatcherUtils.printReceived)(thrown.value.name)}\n`
|
|
440
|
+
: '';
|
|
441
|
+
}
|
|
442
|
+
if (key === 'value') {
|
|
443
|
+
return thrown.isError
|
|
444
|
+
? ''
|
|
445
|
+
: `${label + (0, _jestMatcherUtils.printReceived)(thrown.value)}\n`;
|
|
446
|
+
}
|
|
447
|
+
return '';
|
|
448
|
+
};
|
|
449
|
+
const formatStack = thrown =>
|
|
450
|
+
thrown === null || !thrown.isError
|
|
451
|
+
? ''
|
|
452
|
+
: (0, _jestMessageUtil.formatStackTrace)(
|
|
453
|
+
(0, _jestMessageUtil.separateMessageFromStack)(thrown.value.stack)
|
|
454
|
+
.stack,
|
|
455
|
+
{
|
|
456
|
+
rootDir: process.cwd(),
|
|
457
|
+
testMatch: []
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
noStackTrace: false
|
|
461
|
+
}
|
|
462
|
+
);
|
|
463
|
+
function createMessageAndCauseMessage(error) {
|
|
464
|
+
if (error.cause instanceof Error) {
|
|
465
|
+
return `{ message: ${error.message}, cause: ${createMessageAndCauseMessage(
|
|
466
|
+
error.cause
|
|
467
|
+
)}}`;
|
|
468
|
+
}
|
|
469
|
+
return `{ message: ${error.message} }`;
|
|
470
|
+
}
|
|
471
|
+
function createMessageAndCause(error) {
|
|
472
|
+
if (error.cause instanceof Error) {
|
|
473
|
+
return createMessageAndCauseMessage(error);
|
|
474
|
+
}
|
|
475
|
+
return error.message;
|
|
476
|
+
}
|
|
477
|
+
function messageAndCause(error) {
|
|
478
|
+
return error.cause === undefined ? 'message' : 'message and cause';
|
|
479
|
+
}
|
|
480
|
+
var _default = matchers;
|
|
481
|
+
exports.default = _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "expect",
|
|
3
|
+
"version": "29.7.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/jestjs/jest.git",
|
|
7
|
+
"directory": "packages/expect"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"main": "./build/index.js",
|
|
11
|
+
"types": "./build/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./build/index.d.ts",
|
|
15
|
+
"default": "./build/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json",
|
|
18
|
+
"./build/matchers": "./build/matchers.js",
|
|
19
|
+
"./build/toThrowMatchers": "./build/toThrowMatchers.js"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@jest/expect-utils": "^29.7.0",
|
|
23
|
+
"jest-get-type": "^29.6.3",
|
|
24
|
+
"jest-matcher-utils": "^29.7.0",
|
|
25
|
+
"jest-message-util": "^29.7.0",
|
|
26
|
+
"jest-util": "^29.7.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@fast-check/jest": "^1.3.0",
|
|
30
|
+
"@jest/test-utils": "^29.7.0",
|
|
31
|
+
"@tsd/typescript": "^5.0.4",
|
|
32
|
+
"chalk": "^4.0.0",
|
|
33
|
+
"immutable": "^4.0.0",
|
|
34
|
+
"tsd-lite": "^0.7.0"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"gitHead": "4e56991693da7cd4c3730dc3579a1dd1403ee630"
|
|
43
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-present, Jon Schlinkert.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|