@goast/core 0.4.0 → 0.4.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/esm/_dnt.test_polyfills.d.ts +11 -0
- package/esm/_dnt.test_polyfills.d.ts.map +1 -1
- package/esm/_dnt.test_polyfills.js +14 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/assertion_error.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/false.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/instance_of.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/match.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_instance_of.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_match.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_strict_equals.js +2 -2
- package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/strict_equals.js +6 -6
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_equals.js +2 -2
- package/{script/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts → esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts} +1 -12
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/{assert/1.0.6/is_error.js → expect/1.0.12/_assert_is_error.js} +8 -19
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_not_equals.js +3 -3
- package/esm/deps/jsr.io/@std/expect/{1.0.5/_assertion.d.ts → 1.0.12/_assertions.d.ts} +2 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.js +13 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_asymmetric_matchers.d.ts +14 -4
- package/esm/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_asymmetric_matchers.js +54 -17
- package/esm/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_build_message.js +9 -9
- package/esm/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_custom_equality_tester.js +1 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_equal.js +8 -8
- package/esm/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_extend.js +1 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_inspect_args.js +1 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.js +714 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_mock_util.js +1 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts +4 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.js +10 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_types.d.ts +7 -2
- package/esm/deps/jsr.io/@std/expect/1.0.12/_types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_types.js +3 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_utils.d.ts +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_utils.js +60 -1
- package/{script/deps/jsr.io/@std/expect/1.0.5 → esm/deps/jsr.io/@std/expect/1.0.12}/expect.d.ts +10 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/expect.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/expect.js +101 -3
- package/esm/deps/jsr.io/@std/expect/1.0.12/fn.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/fn.js +1 -1
- package/{script/deps/jsr.io/@std/expect/1.0.5 → esm/deps/jsr.io/@std/expect/1.0.12}/mod.d.ts +8 -7
- package/esm/deps/jsr.io/@std/expect/1.0.12/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/mod.js +9 -8
- package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +160 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +199 -0
- package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/_test_suite.d.ts +6 -1
- package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/_test_suite.js +45 -5
- package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/bdd.d.ts +12 -5
- package/{script/deps/jsr.io/@std/testing/1.0.3 → esm/deps/jsr.io/@std/testing/1.0.9}/bdd.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/bdd.js +85 -7
- package/esm/src/collect/helpers.test.js +2 -2
- package/esm/src/transform/helpers.test.js +2 -2
- package/esm/src/utils/action-provider.test.js +2 -2
- package/esm/src/utils/asset-manager.d.ts +1 -0
- package/esm/src/utils/asset-manager.d.ts.map +1 -1
- package/esm/src/utils/asset-manager.js +1 -1
- package/esm/src/utils/common.utils.test.js +2 -2
- package/esm/src/utils/condition.test.js +2 -2
- package/esm/src/utils/endpoint.utils.test.js +2 -2
- package/esm/src/utils/factory.test.js +2 -2
- package/esm/src/utils/generator.utils.test.js +2 -2
- package/esm/src/utils/object.utils.test.js +2 -2
- package/esm/src/utils/schema.utils.test.js +59 -67
- package/esm/src/utils/source-builder.test.js +3 -4
- package/esm/src/utils/string-builder/string-builder.test.js +11 -12
- package/esm/src/utils/string.utils.test.js +2 -2
- package/esm/tests/openapi.test.js +1 -1
- package/package.json +2 -2
- package/script/_dnt.test_polyfills.d.ts +11 -0
- package/script/_dnt.test_polyfills.d.ts.map +1 -1
- package/script/_dnt.test_polyfills.js +14 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/assertion_error.js +1 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/false.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/false.js +1 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/instance_of.js +1 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/match.js +1 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_instance_of.js +1 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_match.js +1 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_strict_equals.js +2 -2
- package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/strict_equals.js +6 -6
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_equals.js +2 -2
- package/{esm/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts → script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts} +1 -12
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/{assert/1.0.6/is_error.js → expect/1.0.12/_assert_is_error.js} +8 -19
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_not_equals.js +3 -3
- package/script/deps/jsr.io/@std/expect/{1.0.5/_assertion.d.ts → 1.0.12/_assertions.d.ts} +2 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5/_assertion.js → 1.0.12/_assertions.js} +7 -2
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_asymmetric_matchers.d.ts +14 -4
- package/script/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_asymmetric_matchers.js +61 -18
- package/script/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_build_message.js +9 -9
- package/script/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_custom_equality_tester.js +1 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_equal.js +8 -8
- package/script/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_extend.js +1 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_inspect_args.js +1 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.js +748 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_mock_util.js +1 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts +4 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.js +14 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_types.d.ts +7 -2
- package/script/deps/jsr.io/@std/expect/1.0.12/_types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_types.js +1 -1
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_utils.d.ts +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_utils.js +61 -1
- package/{esm/deps/jsr.io/@std/expect/1.0.5 → script/deps/jsr.io/@std/expect/1.0.12}/expect.d.ts +10 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/expect.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/expect.js +103 -5
- package/script/deps/jsr.io/@std/expect/1.0.12/fn.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/fn.js +1 -1
- package/{esm/deps/jsr.io/@std/expect/1.0.5 → script/deps/jsr.io/@std/expect/1.0.12}/mod.d.ts +8 -7
- package/script/deps/jsr.io/@std/expect/1.0.12/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/mod.js +9 -8
- package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +160 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +204 -0
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/_test_suite.d.ts +6 -1
- package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/_test_suite.js +46 -6
- package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/bdd.d.ts +12 -5
- package/{esm/deps/jsr.io/@std/testing/1.0.3 → script/deps/jsr.io/@std/testing/1.0.9}/bdd.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/bdd.js +84 -6
- package/script/src/collect/helpers.test.js +2 -2
- package/script/src/transform/helpers.test.js +2 -2
- package/script/src/utils/action-provider.test.js +2 -2
- package/script/src/utils/asset-manager.d.ts +1 -0
- package/script/src/utils/asset-manager.d.ts.map +1 -1
- package/script/src/utils/asset-manager.js +1 -1
- package/script/src/utils/common.utils.test.js +2 -2
- package/script/src/utils/condition.test.js +2 -2
- package/script/src/utils/endpoint.utils.test.js +2 -2
- package/script/src/utils/factory.test.js +2 -2
- package/script/src/utils/generator.utils.test.js +2 -2
- package/script/src/utils/object.utils.test.js +2 -2
- package/script/src/utils/schema.utils.test.js +58 -66
- package/script/src/utils/source-builder.test.js +3 -4
- package/script/src/utils/string-builder/string-builder.test.js +11 -12
- package/script/src/utils/string.utils.test.js +2 -2
- package/script/tests/openapi.test.js +1 -1
- package/src/_dnt.test_polyfills.ts +27 -0
- package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/assertion_error.ts +1 -1
- package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/false.ts +1 -1
- package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/instance_of.ts +1 -1
- package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/match.ts +1 -1
- package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_instance_of.ts +1 -1
- package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_match.ts +1 -1
- package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_strict_equals.ts +2 -2
- package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/strict_equals.ts +6 -6
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_equals.ts +2 -2
- package/src/deps/jsr.io/@std/{assert/1.0.6/is_error.ts → expect/1.0.12/_assert_is_error.ts} +8 -19
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_not_equals.ts +3 -3
- package/src/deps/jsr.io/@std/expect/1.0.12/_assertions.ts +18 -0
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_asymmetric_matchers.ts +69 -18
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_build_message.ts +9 -9
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_custom_equality_tester.ts +1 -1
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_equal.ts +10 -9
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_extend.ts +1 -1
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_inspect_args.ts +1 -1
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_matchers.ts +308 -108
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_mock_util.ts +1 -1
- package/src/deps/jsr.io/@std/expect/1.0.12/_serializer.ts +15 -0
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_types.ts +9 -3
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_utils.ts +83 -1
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/expect.ts +113 -4
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/fn.ts +1 -1
- package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/mod.ts +9 -8
- package/src/deps/jsr.io/@std/internal/1.0.5/assertion_state.ts +214 -0
- package/src/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/_test_suite.ts +68 -9
- package/src/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/bdd.ts +98 -12
- package/src/src/collect/helpers.test.ts +2 -2
- package/src/src/transform/helpers.test.ts +2 -2
- package/src/src/utils/action-provider.test.ts +2 -2
- package/src/src/utils/asset-manager.ts +1 -1
- package/src/src/utils/common.utils.test.ts +2 -2
- package/src/src/utils/condition.test.ts +2 -2
- package/src/src/utils/endpoint.utils.test.ts +2 -2
- package/src/src/utils/factory.test.ts +2 -2
- package/src/src/utils/generator.utils.test.ts +2 -2
- package/src/src/utils/object.utils.test.ts +2 -2
- package/src/src/utils/schema.utils.test.ts +68 -67
- package/src/src/utils/source-builder.test.ts +3 -4
- package/src/src/utils/string-builder/string-builder.test.ts +11 -12
- package/src/src/utils/string.utils.test.ts +2 -2
- package/src/tests/openapi.test.ts +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/assertion_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/equal.d.ts +0 -17
- package/esm/deps/jsr.io/@std/assert/1.0.6/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/equal.js +0 -136
- package/esm/deps/jsr.io/@std/assert/1.0.6/equals.d.ts +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.6/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/equals.js +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.6/false.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/not_instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/not_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts +0 -28
- package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.js +0 -159
- package/esm/deps/jsr.io/@std/assert/1.0.6/strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_assert_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_assert_not_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_assertion.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_assertion.js +0 -9
- package/esm/deps/jsr.io/@std/expect/1.0.5/_asymmetric_matchers.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_build_message.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_custom_equality_tester.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_extend.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_inspect_args.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_matchers.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_matchers.js +0 -564
- package/esm/deps/jsr.io/@std/expect/1.0.5/_mock_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/_types.js +0 -3
- package/esm/deps/jsr.io/@std/expect/1.0.5/_utils.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/expect.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/fn.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.5/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts +0 -75
- package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.js +0 -101
- package/esm/deps/jsr.io/@std/testing/1.0.3/_test_suite.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/assertion_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/equal.d.ts +0 -17
- package/script/deps/jsr.io/@std/assert/1.0.6/equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/equal.js +0 -139
- package/script/deps/jsr.io/@std/assert/1.0.6/equals.d.ts +0 -22
- package/script/deps/jsr.io/@std/assert/1.0.6/equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/equals.js +0 -48
- package/script/deps/jsr.io/@std/assert/1.0.6/false.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/not_instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/not_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts +0 -28
- package/script/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.6/object_match.js +0 -162
- package/script/deps/jsr.io/@std/assert/1.0.6/strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_assert_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_assert_not_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_assertion.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_asymmetric_matchers.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_build_message.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_custom_equality_tester.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_extend.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_inspect_args.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_matchers.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_matchers.js +0 -598
- package/script/deps/jsr.io/@std/expect/1.0.5/_mock_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_types.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/_utils.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/expect.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/fn.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.5/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts +0 -75
- package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.js +0 -106
- package/script/deps/jsr.io/@std/testing/1.0.3/_test_suite.d.ts.map +0 -1
- package/src/deps/jsr.io/@std/assert/1.0.6/equal.ts +0 -152
- package/src/deps/jsr.io/@std/assert/1.0.6/equals.ts +0 -52
- package/src/deps/jsr.io/@std/assert/1.0.6/object_match.ts +0 -202
- package/src/deps/jsr.io/@std/expect/1.0.5/_assertion.ts +0 -13
- package/src/deps/jsr.io/@std/internal/1.0.4/assertion_state.ts +0 -111
- /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/assertion_error.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/false.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/instance_of.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/match.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_instance_of.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_match.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_strict_equals.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/strict_equals.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_equals.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_not_equals.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_build_message.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_custom_equality_tester.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_equal.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_extend.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_inspect_args.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_matchers.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_mock_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/fn.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/assertion_error.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/false.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/instance_of.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/match.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_instance_of.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_match.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_strict_equals.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/strict_equals.d.ts +0 -0
- /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_equals.d.ts +0 -0
- /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_not_equals.d.ts +0 -0
- /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_build_message.d.ts +0 -0
- /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_custom_equality_tester.d.ts +0 -0
- /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_equal.d.ts +0 -0
- /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_extend.d.ts +0 -0
- /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_inspect_args.d.ts +0 -0
- /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_matchers.d.ts +0 -0
- /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_mock_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/fn.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.js +0 -0
- /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.ts +0 -0
- /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.ts +0 -0
- /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.ts +0 -0
- /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.ts +0 -0
- /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.ts +0 -0
- /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.ts +0 -0
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check the test suite internal state
|
|
3
|
-
*
|
|
4
|
-
* @example Usage
|
|
5
|
-
* ```ts ignore
|
|
6
|
-
* import { AssertionState } from "@std/internal";
|
|
7
|
-
*
|
|
8
|
-
* const assertionState = new AssertionState();
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
export declare class AssertionState {
|
|
12
|
-
#private;
|
|
13
|
-
constructor();
|
|
14
|
-
/**
|
|
15
|
-
* If `expect.hasAssertions` called, then through this method to update #state.assertionCheck value.
|
|
16
|
-
*
|
|
17
|
-
* @param val Set #state.assertionCheck's value
|
|
18
|
-
*
|
|
19
|
-
* @example Usage
|
|
20
|
-
* ```ts ignore
|
|
21
|
-
* import { AssertionState } from "@std/internal";
|
|
22
|
-
*
|
|
23
|
-
* const assertionState = new AssertionState();
|
|
24
|
-
* assertionState.setAssertionCheck(true);
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
setAssertionCheck(val: boolean): void;
|
|
28
|
-
/**
|
|
29
|
-
* If any matchers was called, `#state.assertionTriggered` will be set through this method.
|
|
30
|
-
*
|
|
31
|
-
* @param val Set #state.assertionTriggered's value
|
|
32
|
-
*
|
|
33
|
-
* @example Usage
|
|
34
|
-
* ```ts ignore
|
|
35
|
-
* import { AssertionState } from "@std/internal";
|
|
36
|
-
*
|
|
37
|
-
* const assertionState = new AssertionState();
|
|
38
|
-
* assertionState.setAssertionTriggered(true);
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
setAssertionTriggered(val: boolean): void;
|
|
42
|
-
/**
|
|
43
|
-
* Check Assertion internal state, if `#state.assertionCheck` is set true, but
|
|
44
|
-
* `#state.assertionTriggered` is still false, then should throw an Assertion Error.
|
|
45
|
-
*
|
|
46
|
-
* @returns a boolean value, that the test suite is satisfied with the check. If not,
|
|
47
|
-
* it should throw an AssertionError.
|
|
48
|
-
*
|
|
49
|
-
* @example Usage
|
|
50
|
-
* ```ts ignore
|
|
51
|
-
* import { AssertionState } from "@std/internal";
|
|
52
|
-
*
|
|
53
|
-
* const assertionState = new AssertionState();
|
|
54
|
-
* if (assertionState.checkAssertionErrorStateAndReset()) {
|
|
55
|
-
* // throw AssertionError("");
|
|
56
|
-
* }
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
checkAssertionErrorStateAndReset(): boolean;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* return an instance of AssertionState
|
|
63
|
-
*
|
|
64
|
-
* @returns AssertionState
|
|
65
|
-
*
|
|
66
|
-
* @example Usage
|
|
67
|
-
* ```ts ignore
|
|
68
|
-
* import { getAssertionState } from "@std/internal";
|
|
69
|
-
*
|
|
70
|
-
* const assertionState = getAssertionState();
|
|
71
|
-
* assertionState.setAssertionTriggered(true);
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
export declare function getAssertionState(): AssertionState;
|
|
75
|
-
//# sourceMappingURL=assertion_state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assertion_state.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.4/assertion_state.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,qBAAa,cAAc;;;IAazB;;;;;;;;;;;;OAYG;IACH,iBAAiB,CAAC,GAAG,EAAE,OAAO;IAI9B;;;;;;;;;;;;OAYG;IACH,qBAAqB,CAAC,GAAG,EAAE,OAAO;IAIlC;;;;;;;;;;;;;;;;OAgBG;IACH,gCAAgC,IAAI,OAAO;CAe5C;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAElD"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
var _AssertionState_instances, _AssertionState_state, _AssertionState_resetAssertionState;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.AssertionState = void 0;
|
|
6
|
-
exports.getAssertionState = getAssertionState;
|
|
7
|
-
const tslib_1 = require("tslib");
|
|
8
|
-
/**
|
|
9
|
-
* Check the test suite internal state
|
|
10
|
-
*
|
|
11
|
-
* @example Usage
|
|
12
|
-
* ```ts ignore
|
|
13
|
-
* import { AssertionState } from "@std/internal";
|
|
14
|
-
*
|
|
15
|
-
* const assertionState = new AssertionState();
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
class AssertionState {
|
|
19
|
-
constructor() {
|
|
20
|
-
_AssertionState_instances.add(this);
|
|
21
|
-
_AssertionState_state.set(this, void 0);
|
|
22
|
-
tslib_1.__classPrivateFieldSet(this, _AssertionState_state, {
|
|
23
|
-
assertionCheck: false,
|
|
24
|
-
assertionTriggered: false,
|
|
25
|
-
}, "f");
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* If `expect.hasAssertions` called, then through this method to update #state.assertionCheck value.
|
|
29
|
-
*
|
|
30
|
-
* @param val Set #state.assertionCheck's value
|
|
31
|
-
*
|
|
32
|
-
* @example Usage
|
|
33
|
-
* ```ts ignore
|
|
34
|
-
* import { AssertionState } from "@std/internal";
|
|
35
|
-
*
|
|
36
|
-
* const assertionState = new AssertionState();
|
|
37
|
-
* assertionState.setAssertionCheck(true);
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
setAssertionCheck(val) {
|
|
41
|
-
tslib_1.__classPrivateFieldGet(this, _AssertionState_state, "f").assertionCheck = val;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* If any matchers was called, `#state.assertionTriggered` will be set through this method.
|
|
45
|
-
*
|
|
46
|
-
* @param val Set #state.assertionTriggered's value
|
|
47
|
-
*
|
|
48
|
-
* @example Usage
|
|
49
|
-
* ```ts ignore
|
|
50
|
-
* import { AssertionState } from "@std/internal";
|
|
51
|
-
*
|
|
52
|
-
* const assertionState = new AssertionState();
|
|
53
|
-
* assertionState.setAssertionTriggered(true);
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
setAssertionTriggered(val) {
|
|
57
|
-
tslib_1.__classPrivateFieldGet(this, _AssertionState_state, "f").assertionTriggered = val;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Check Assertion internal state, if `#state.assertionCheck` is set true, but
|
|
61
|
-
* `#state.assertionTriggered` is still false, then should throw an Assertion Error.
|
|
62
|
-
*
|
|
63
|
-
* @returns a boolean value, that the test suite is satisfied with the check. If not,
|
|
64
|
-
* it should throw an AssertionError.
|
|
65
|
-
*
|
|
66
|
-
* @example Usage
|
|
67
|
-
* ```ts ignore
|
|
68
|
-
* import { AssertionState } from "@std/internal";
|
|
69
|
-
*
|
|
70
|
-
* const assertionState = new AssertionState();
|
|
71
|
-
* if (assertionState.checkAssertionErrorStateAndReset()) {
|
|
72
|
-
* // throw AssertionError("");
|
|
73
|
-
* }
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
checkAssertionErrorStateAndReset() {
|
|
77
|
-
const result = tslib_1.__classPrivateFieldGet(this, _AssertionState_state, "f").assertionCheck &&
|
|
78
|
-
!tslib_1.__classPrivateFieldGet(this, _AssertionState_state, "f").assertionTriggered;
|
|
79
|
-
tslib_1.__classPrivateFieldGet(this, _AssertionState_instances, "m", _AssertionState_resetAssertionState).call(this);
|
|
80
|
-
return result;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
exports.AssertionState = AssertionState;
|
|
84
|
-
_AssertionState_state = new WeakMap(), _AssertionState_instances = new WeakSet(), _AssertionState_resetAssertionState = function _AssertionState_resetAssertionState() {
|
|
85
|
-
tslib_1.__classPrivateFieldSet(this, _AssertionState_state, {
|
|
86
|
-
assertionCheck: false,
|
|
87
|
-
assertionTriggered: false,
|
|
88
|
-
}, "f");
|
|
89
|
-
};
|
|
90
|
-
const assertionState = new AssertionState();
|
|
91
|
-
/**
|
|
92
|
-
* return an instance of AssertionState
|
|
93
|
-
*
|
|
94
|
-
* @returns AssertionState
|
|
95
|
-
*
|
|
96
|
-
* @example Usage
|
|
97
|
-
* ```ts ignore
|
|
98
|
-
* import { getAssertionState } from "@std/internal";
|
|
99
|
-
*
|
|
100
|
-
* const assertionState = getAssertionState();
|
|
101
|
-
* assertionState.setAssertionTriggered(true);
|
|
102
|
-
* ```
|
|
103
|
-
*/
|
|
104
|
-
function getAssertionState() {
|
|
105
|
-
return assertionState;
|
|
106
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_test_suite.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/testing/1.0.3/_test_suite.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
-
// This module is browser compatible.
|
|
3
|
-
|
|
4
|
-
type KeyedCollection = Set<unknown> | Map<unknown, unknown>;
|
|
5
|
-
function isKeyedCollection(x: unknown): x is KeyedCollection {
|
|
6
|
-
return x instanceof Set || x instanceof Map;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function constructorsEqual(a: object, b: object) {
|
|
10
|
-
return a.constructor === b.constructor ||
|
|
11
|
-
a.constructor === Object && !b.constructor ||
|
|
12
|
-
!a.constructor && b.constructor === Object;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Deep equality comparison used in assertions.
|
|
17
|
-
*
|
|
18
|
-
* @param c The actual value
|
|
19
|
-
* @param d The expected value
|
|
20
|
-
* @returns `true` if the values are deeply equal, `false` otherwise
|
|
21
|
-
*
|
|
22
|
-
* @example Usage
|
|
23
|
-
* ```ts
|
|
24
|
-
* import { equal } from "@std/assert/equal";
|
|
25
|
-
*
|
|
26
|
-
* equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
|
|
27
|
-
* equal({ foo: "bar" }, { foo: "baz" }); // Returns `false
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export function equal(c: unknown, d: unknown): boolean {
|
|
31
|
-
const seen = new Map();
|
|
32
|
-
return (function compare(a: unknown, b: unknown): boolean {
|
|
33
|
-
// Have to render RegExp & Date for string comparison
|
|
34
|
-
// unless it's mistreated as object
|
|
35
|
-
if (
|
|
36
|
-
a &&
|
|
37
|
-
b &&
|
|
38
|
-
((a instanceof RegExp && b instanceof RegExp) ||
|
|
39
|
-
(a instanceof URL && b instanceof URL))
|
|
40
|
-
) {
|
|
41
|
-
return String(a) === String(b);
|
|
42
|
-
}
|
|
43
|
-
if (a instanceof Date && b instanceof Date) {
|
|
44
|
-
const aTime = a.getTime();
|
|
45
|
-
const bTime = b.getTime();
|
|
46
|
-
// Check for NaN equality manually since NaN is not
|
|
47
|
-
// equal to itself.
|
|
48
|
-
if (Number.isNaN(aTime) && Number.isNaN(bTime)) {
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
return aTime === bTime;
|
|
52
|
-
}
|
|
53
|
-
if (typeof a === "number" && typeof b === "number") {
|
|
54
|
-
return Number.isNaN(a) && Number.isNaN(b) || a === b;
|
|
55
|
-
}
|
|
56
|
-
if (Object.is(a, b)) {
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
if (a && typeof a === "object" && b && typeof b === "object") {
|
|
60
|
-
if (a && b && !constructorsEqual(a, b)) {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
if (a instanceof WeakMap || b instanceof WeakMap) {
|
|
64
|
-
if (!(a instanceof WeakMap && b instanceof WeakMap)) return false;
|
|
65
|
-
throw new TypeError("cannot compare WeakMap instances");
|
|
66
|
-
}
|
|
67
|
-
if (a instanceof WeakSet || b instanceof WeakSet) {
|
|
68
|
-
if (!(a instanceof WeakSet && b instanceof WeakSet)) return false;
|
|
69
|
-
throw new TypeError("cannot compare WeakSet instances");
|
|
70
|
-
}
|
|
71
|
-
if (a instanceof WeakRef || b instanceof WeakRef) {
|
|
72
|
-
if (!(a instanceof WeakRef && b instanceof WeakRef)) return false;
|
|
73
|
-
return compare(a.deref(), b.deref());
|
|
74
|
-
}
|
|
75
|
-
if (seen.get(a) === b) {
|
|
76
|
-
return true;
|
|
77
|
-
}
|
|
78
|
-
if (Object.keys(a).length !== Object.keys(b).length) {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
seen.set(a, b);
|
|
82
|
-
if (isKeyedCollection(a) && isKeyedCollection(b)) {
|
|
83
|
-
if (a.size !== b.size) {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const aKeys = [...a.keys()];
|
|
88
|
-
const primitiveKeysFastPath = aKeys.every((k) => {
|
|
89
|
-
return typeof k === "string" ||
|
|
90
|
-
typeof k === "number" ||
|
|
91
|
-
typeof k === "boolean" ||
|
|
92
|
-
typeof k === "bigint" ||
|
|
93
|
-
typeof k === "symbol" ||
|
|
94
|
-
k == null;
|
|
95
|
-
});
|
|
96
|
-
if (primitiveKeysFastPath) {
|
|
97
|
-
if (a instanceof Set) {
|
|
98
|
-
return a.symmetricDifference(b).size === 0;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
for (const key of aKeys) {
|
|
102
|
-
if (
|
|
103
|
-
!b.has(key) ||
|
|
104
|
-
!compare(a.get(key), (b as Map<unknown, unknown>).get(key))
|
|
105
|
-
) {
|
|
106
|
-
return false;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return true;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
let unmatchedEntries = a.size;
|
|
113
|
-
|
|
114
|
-
for (const [aKey, aValue] of a.entries()) {
|
|
115
|
-
for (const [bKey, bValue] of b.entries()) {
|
|
116
|
-
/* Given that Map keys can be references, we need
|
|
117
|
-
* to ensure that they are also deeply equal */
|
|
118
|
-
|
|
119
|
-
if (!compare(aKey, bKey)) continue;
|
|
120
|
-
|
|
121
|
-
if (
|
|
122
|
-
(aKey === aValue && bKey === bValue) ||
|
|
123
|
-
(compare(aValue, bValue))
|
|
124
|
-
) {
|
|
125
|
-
unmatchedEntries--;
|
|
126
|
-
break;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return unmatchedEntries === 0;
|
|
132
|
-
}
|
|
133
|
-
const merged = { ...a, ...b };
|
|
134
|
-
for (
|
|
135
|
-
const key of [
|
|
136
|
-
...Object.getOwnPropertyNames(merged),
|
|
137
|
-
...Object.getOwnPropertySymbols(merged),
|
|
138
|
-
]
|
|
139
|
-
) {
|
|
140
|
-
type Key = keyof typeof merged;
|
|
141
|
-
if (!compare(a && a[key as Key], b && b[key as Key])) {
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
if (((key in a) && (!(key in b))) || ((key in b) && (!(key in a)))) {
|
|
145
|
-
return false;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return true;
|
|
149
|
-
}
|
|
150
|
-
return false;
|
|
151
|
-
})(c, d);
|
|
152
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
-
// This module is browser compatible.
|
|
3
|
-
import { equal } from "./equal.js";
|
|
4
|
-
import { buildMessage } from "../../internal/1.0.4/build_message.js";
|
|
5
|
-
import { diff } from "../../internal/1.0.4/diff.js";
|
|
6
|
-
import { diffStr } from "../../internal/1.0.4/diff_str.js";
|
|
7
|
-
import { format } from "../../internal/1.0.4/format.js";
|
|
8
|
-
|
|
9
|
-
import { AssertionError } from "./assertion_error.js";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Make an assertion that `actual` and `expected` are equal, deeply. If not
|
|
13
|
-
* deeply equal, then throw.
|
|
14
|
-
*
|
|
15
|
-
* Type parameter can be specified to ensure values under comparison have the
|
|
16
|
-
* same type.
|
|
17
|
-
*
|
|
18
|
-
* @example Usage
|
|
19
|
-
* ```ts ignore
|
|
20
|
-
* import { assertEquals } from "@std/assert";
|
|
21
|
-
*
|
|
22
|
-
* assertEquals("world", "world"); // Doesn't throw
|
|
23
|
-
* assertEquals("hello", "world"); // Throws
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @typeParam T The type of the values to compare. This is usually inferred.
|
|
27
|
-
* @param actual The actual value to compare.
|
|
28
|
-
* @param expected The expected value to compare.
|
|
29
|
-
* @param msg The optional message to display if the assertion fails.
|
|
30
|
-
*/
|
|
31
|
-
export function assertEquals<T>(
|
|
32
|
-
actual: T,
|
|
33
|
-
expected: T,
|
|
34
|
-
msg?: string,
|
|
35
|
-
) {
|
|
36
|
-
if (equal(actual, expected)) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
40
|
-
let message = `Values are not equal${msgSuffix}`;
|
|
41
|
-
|
|
42
|
-
const actualString = format(actual);
|
|
43
|
-
const expectedString = format(expected);
|
|
44
|
-
const stringDiff = (typeof actual === "string") &&
|
|
45
|
-
(typeof expected === "string");
|
|
46
|
-
const diffResult = stringDiff
|
|
47
|
-
? diffStr(actual as string, expected as string)
|
|
48
|
-
: diff(actualString.split("\n"), expectedString.split("\n"));
|
|
49
|
-
const diffMsg = buildMessage(diffResult, { stringDiff }).join("\n");
|
|
50
|
-
message = `${message}\n${diffMsg}`;
|
|
51
|
-
throw new AssertionError(message);
|
|
52
|
-
}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
-
// This module is browser compatible.
|
|
3
|
-
import { assertEquals } from "./equals.js";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Make an assertion that `expected` object is a subset of `actual` object,
|
|
7
|
-
* deeply. If not, then throw.
|
|
8
|
-
*
|
|
9
|
-
* @example Usage
|
|
10
|
-
* ```ts ignore
|
|
11
|
-
* import { assertObjectMatch } from "@std/assert";
|
|
12
|
-
*
|
|
13
|
-
* assertObjectMatch({ foo: "bar" }, { foo: "bar" }); // Doesn't throw
|
|
14
|
-
* assertObjectMatch({ foo: "bar" }, { foo: "baz" }); // Throws
|
|
15
|
-
* assertObjectMatch({ foo: 1, bar: 2 }, { foo: 1 }); // Doesn't throw
|
|
16
|
-
* assertObjectMatch({ foo: 1 }, { foo: 1, bar: 2 }); // Throws
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* @example Usage with nested objects
|
|
20
|
-
* ```ts ignore
|
|
21
|
-
* import { assertObjectMatch } from "@std/assert";
|
|
22
|
-
*
|
|
23
|
-
* assertObjectMatch({ foo: { bar: 3, baz: 4 } }, { foo: { bar: 3 } }); // Doesn't throw
|
|
24
|
-
* assertObjectMatch({ foo: { bar: 3 } }, { foo: { bar: 3, baz: 4 } }); // Throws
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @param actual The actual value to be matched.
|
|
28
|
-
* @param expected The expected value to match.
|
|
29
|
-
* @param msg The optional message to display if the assertion fails.
|
|
30
|
-
*/
|
|
31
|
-
export function assertObjectMatch(
|
|
32
|
-
// deno-lint-ignore no-explicit-any
|
|
33
|
-
actual: Record<PropertyKey, any>,
|
|
34
|
-
expected: Record<PropertyKey, unknown>,
|
|
35
|
-
msg?: string,
|
|
36
|
-
): void {
|
|
37
|
-
return assertEquals(
|
|
38
|
-
// get the intersection of "actual" and "expected"
|
|
39
|
-
// side effect: all the instances' constructor field is "Object" now.
|
|
40
|
-
filter(actual, expected),
|
|
41
|
-
// set (nested) instances' constructor field to be "Object" without changing expected value.
|
|
42
|
-
// see https://github.com/denoland/deno_std/pull/1419
|
|
43
|
-
filter(expected, expected),
|
|
44
|
-
msg,
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
type loose = Record<PropertyKey, unknown>;
|
|
49
|
-
|
|
50
|
-
function isObject(val: unknown): boolean {
|
|
51
|
-
return typeof val === "object" && val !== null;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function filter(a: loose, b: loose): loose {
|
|
55
|
-
const seen = new WeakMap();
|
|
56
|
-
return filterObject(a, b);
|
|
57
|
-
|
|
58
|
-
function filterObject(a: loose, b: loose): loose {
|
|
59
|
-
// Prevent infinite loop with circular references with same filter
|
|
60
|
-
if ((seen.has(a)) && (seen.get(a) === b)) {
|
|
61
|
-
return a;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
try {
|
|
65
|
-
seen.set(a, b);
|
|
66
|
-
} catch (err) {
|
|
67
|
-
if (err instanceof TypeError) {
|
|
68
|
-
throw new TypeError(
|
|
69
|
-
`Cannot assertObjectMatch ${a === null ? null : `type ${typeof a}`}`,
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Filter keys and symbols which are present in both actual and expected
|
|
75
|
-
const filtered = {} as loose;
|
|
76
|
-
const keysA = Reflect.ownKeys(a);
|
|
77
|
-
const keysB = Reflect.ownKeys(b);
|
|
78
|
-
const entries = keysA.filter((key) => keysB.includes(key))
|
|
79
|
-
.map((key) => [key, a[key as string]]) as Array<[string, unknown]>;
|
|
80
|
-
|
|
81
|
-
if (keysA.length && keysB.length && !entries.length) {
|
|
82
|
-
// If both objects are not empty but don't have the same keys or symbols,
|
|
83
|
-
// returns the entries in object a.
|
|
84
|
-
for (const key of keysA) {
|
|
85
|
-
filtered[key] = a[key];
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return filtered;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
for (const [key, value] of entries) {
|
|
92
|
-
// On regexp references, keep value as it to avoid loosing pattern and flags
|
|
93
|
-
if (value instanceof RegExp) {
|
|
94
|
-
filtered[key] = value;
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const subset = (b as loose)[key];
|
|
99
|
-
|
|
100
|
-
// On array references, build a filtered array and filter nested objects inside
|
|
101
|
-
if (Array.isArray(value) && Array.isArray(subset)) {
|
|
102
|
-
filtered[key] = filterArray(value, subset);
|
|
103
|
-
continue;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// On nested objects references, build a filtered object recursively
|
|
107
|
-
if (isObject(value) && isObject(subset)) {
|
|
108
|
-
// When both operands are maps, build a filtered map with common keys and filter nested objects inside
|
|
109
|
-
if ((value instanceof Map) && (subset instanceof Map)) {
|
|
110
|
-
filtered[key] = new Map(
|
|
111
|
-
[...value].filter(([k]) => subset.has(k)).map(
|
|
112
|
-
([k, v]) => {
|
|
113
|
-
const v2 = subset.get(k);
|
|
114
|
-
if (isObject(v) && isObject(v2)) {
|
|
115
|
-
return [k, filterObject(v as loose, v2 as loose)];
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return [k, v];
|
|
119
|
-
},
|
|
120
|
-
),
|
|
121
|
-
);
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// When both operands are set, build a filtered set with common values
|
|
126
|
-
if ((value instanceof Set) && (subset instanceof Set)) {
|
|
127
|
-
filtered[key] = value.intersection(subset);
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
filtered[key] = filterObject(value as loose, subset as loose);
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
filtered[key] = value;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
return filtered;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function filterArray(a: unknown[], b: unknown[]): unknown[] {
|
|
142
|
-
// Prevent infinite loop with circular references with same filter
|
|
143
|
-
if (seen.has(a) && (seen.get(a) === b)) {
|
|
144
|
-
return a;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
seen.set(a, b);
|
|
148
|
-
|
|
149
|
-
const filtered: unknown[] = [];
|
|
150
|
-
const count = Math.min(a.length, b.length);
|
|
151
|
-
|
|
152
|
-
for (let i = 0; i < count; ++i) {
|
|
153
|
-
const value = a[i];
|
|
154
|
-
const subset = b[i];
|
|
155
|
-
|
|
156
|
-
// On regexp references, keep value as it to avoid loosing pattern and flags
|
|
157
|
-
if (value instanceof RegExp) {
|
|
158
|
-
filtered.push(value);
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// On array references, build a filtered array and filter nested objects inside
|
|
163
|
-
if (Array.isArray(value) && Array.isArray(subset)) {
|
|
164
|
-
filtered.push(filterArray(value, subset));
|
|
165
|
-
continue;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// On nested objects references, build a filtered object recursively
|
|
169
|
-
if (isObject(value) && isObject(subset)) {
|
|
170
|
-
// When both operands are maps, build a filtered map with common keys and filter nested objects inside
|
|
171
|
-
if ((value instanceof Map) && (subset instanceof Map)) {
|
|
172
|
-
const map = new Map(
|
|
173
|
-
[...value].filter(([k]) => subset.has(k))
|
|
174
|
-
.map(([k, v]) => {
|
|
175
|
-
const v2 = subset.get(k);
|
|
176
|
-
if (isObject(v) && isObject(v2)) {
|
|
177
|
-
return [k, filterObject(v as loose, v2 as loose)];
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
return [k, v];
|
|
181
|
-
}),
|
|
182
|
-
);
|
|
183
|
-
filtered.push(map);
|
|
184
|
-
continue;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// When both operands are set, build a filtered set with common values
|
|
188
|
-
if ((value instanceof Set) && (subset instanceof Set)) {
|
|
189
|
-
filtered.push(value.intersection(subset));
|
|
190
|
-
continue;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
filtered.push(filterObject(value as loose, subset as loose));
|
|
194
|
-
continue;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
filtered.push(value);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
return filtered;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
-
|
|
3
|
-
import { getAssertionState } from "../../internal/1.0.4/assertion_state.js";
|
|
4
|
-
|
|
5
|
-
const assertionState = getAssertionState();
|
|
6
|
-
|
|
7
|
-
export function hasAssertions() {
|
|
8
|
-
assertionState.setAssertionCheck(true);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function emitAssertionTrigger() {
|
|
12
|
-
assertionState.setAssertionTriggered(true);
|
|
13
|
-
}
|