@goast/kotlin 0.4.7-beta2 → 0.4.8
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/LICENSE +21 -21
- package/README.md +45 -45
- package/assets/client/okhttp3/ApiClient.kt +250 -250
- package/esm/_dnt.test_polyfills.d.ts +29 -0
- package/esm/_dnt.test_polyfills.d.ts.map +1 -0
- package/esm/_dnt.test_polyfills.js +31 -0
- package/esm/_dnt.test_shims.d.ts +6 -0
- package/esm/_dnt.test_shims.d.ts.map +1 -0
- package/esm/_dnt.test_shims.js +61 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/assertion_error.d.ts +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/assertion_error.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/equal.d.ts +17 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/equal.js +183 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/equals.d.ts +35 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/equals.js +58 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/false.d.ts +18 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/false.js +22 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/instance_of.d.ts +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/instance_of.js +53 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/is_error.d.ts +25 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/is_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/is_error.js +54 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/match.d.ts +18 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/match.js +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/not_instance_of.d.ts +20 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/not_instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/not_instance_of.js +29 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/not_match.d.ts +18 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/not_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/not_match.js +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/not_strict_equals.d.ts +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/not_strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/not_strict_equals.js +32 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/rejects.d.ts +42 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/rejects.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/rejects.js +53 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/strict_equals.d.ts +24 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.9/strict_equals.js +57 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_assert_equals.d.ts +20 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_assert_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_assert_equals.js +29 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_assert_not_equals.d.ts +17 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_assert_not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_assert_not_equals.js +26 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_assertions.d.ts +4 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_assertions.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_assertions.js +13 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_asymmetric_matchers.d.ts +46 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_asymmetric_matchers.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_asymmetric_matchers.js +160 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_build_message.d.ts +6 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_build_message.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_build_message.js +29 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_custom_equality_tester.d.ts +4 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_custom_equality_tester.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_custom_equality_tester.js +11 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_equal.d.ts +9 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_equal.js +191 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_extend.d.ts +4 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_extend.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_extend.js +11 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_inspect_args.d.ts +3 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_inspect_args.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_inspect_args.js +12 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_matchers.d.ts +34 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_matchers.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_matchers.js +568 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_mock_util.d.ts +11 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_mock_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_mock_util.js +10 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_serializer.d.ts +4 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_serializer.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_serializer.js +10 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_types.d.ts +839 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_types.js +3 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_utils.d.ts +9 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/_utils.js +218 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/expect.d.ts +60 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/expect.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.9/expect.js +523 -0
- 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.5/build_message.d.ts +82 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +111 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +140 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +277 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +99 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +180 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts +2 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +37 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +159 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +207 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts +16 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +2 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/_mock_utils.d.ts +15 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/_mock_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/_mock_utils.js +35 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/_test_suite.d.ts +74 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/_test_suite.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/_test_suite.js +350 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/bdd.d.ts +736 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/bdd.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/bdd.js +652 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/mock.d.ts +674 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/mock.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/testing/1.0.6/mock.js +1083 -0
- package/esm/src/ast/nodes/annotation.test.d.ts +2 -0
- package/esm/src/ast/nodes/annotation.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/annotation.test.js +56 -0
- package/esm/src/ast/nodes/argument.test.d.ts +2 -0
- package/esm/src/ast/nodes/argument.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/argument.test.js +33 -0
- package/esm/src/ast/nodes/call.test.d.ts +2 -0
- package/esm/src/ast/nodes/call.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/call.test.js +35 -0
- package/esm/src/ast/nodes/class.test.d.ts +2 -0
- package/esm/src/ast/nodes/class.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/class.test.js +219 -0
- package/esm/src/ast/nodes/constructor.test.d.ts +2 -0
- package/esm/src/ast/nodes/constructor.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/constructor.test.js +139 -0
- package/esm/src/ast/nodes/doc-tag.test.d.ts +2 -0
- package/esm/src/ast/nodes/doc-tag.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/doc-tag.test.js +67 -0
- package/esm/src/ast/nodes/doc.test.d.ts +2 -0
- package/esm/src/ast/nodes/doc.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/doc.test.js +33 -0
- package/esm/src/ast/nodes/enum-value.test.d.ts +2 -0
- package/esm/src/ast/nodes/enum-value.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/enum-value.test.js +115 -0
- package/esm/src/ast/nodes/enum.test.d.ts +2 -0
- package/esm/src/ast/nodes/enum.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/enum.test.js +129 -0
- package/esm/src/ast/nodes/function.test.d.ts +2 -0
- package/esm/src/ast/nodes/function.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/function.test.js +160 -0
- package/esm/src/ast/nodes/generic-parameter.test.d.ts +2 -0
- package/esm/src/ast/nodes/generic-parameter.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/generic-parameter.test.js +49 -0
- package/esm/src/ast/nodes/init-block.test.d.ts +2 -0
- package/esm/src/ast/nodes/init-block.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/init-block.test.js +28 -0
- package/esm/src/ast/nodes/interface.test.d.ts +2 -0
- package/esm/src/ast/nodes/interface.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/interface.test.js +121 -0
- package/esm/src/ast/nodes/object.test.d.ts +2 -0
- package/esm/src/ast/nodes/object.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/object.test.js +78 -0
- package/esm/src/ast/nodes/parameter.test.d.ts +2 -0
- package/esm/src/ast/nodes/parameter.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/parameter.test.js +152 -0
- package/esm/src/ast/nodes/property.test.d.ts +2 -0
- package/esm/src/ast/nodes/property.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/property.test.js +206 -0
- package/esm/src/ast/nodes/reference.test.d.ts +2 -0
- package/esm/src/ast/nodes/reference.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/reference.test.js +36 -0
- package/esm/src/ast/nodes/string.test.d.ts +2 -0
- package/esm/src/ast/nodes/string.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/string.test.js +48 -0
- package/esm/src/generators/services/okhttp3-clients/okhttp3-client-generator.js +26 -26
- package/esm/src/generators/services/spring-controllers/models.d.ts +1 -0
- package/esm/src/generators/services/spring-controllers/models.d.ts.map +1 -1
- package/esm/src/generators/services/spring-controllers/models.js +1 -0
- package/esm/src/generators/services/spring-controllers/spring-controller-generator.d.ts +1 -1
- package/esm/src/generators/services/spring-controllers/spring-controller-generator.d.ts.map +1 -1
- package/esm/src/generators/services/spring-controllers/spring-controller-generator.js +11 -4
- package/esm/src/import-collection.test.d.ts +2 -0
- package/esm/src/import-collection.test.d.ts.map +1 -0
- package/esm/src/import-collection.test.js +99 -0
- package/esm/tests/openapi-models.test.d.ts +2 -0
- package/esm/tests/openapi-models.test.d.ts.map +1 -0
- package/esm/tests/openapi-models.test.js +45 -0
- package/package.json +1 -1
- package/script/_dnt.test_polyfills.d.ts +29 -0
- package/script/_dnt.test_polyfills.d.ts.map +1 -0
- package/script/_dnt.test_polyfills.js +32 -0
- package/script/_dnt.test_shims.d.ts +6 -0
- package/script/_dnt.test_shims.d.ts.map +1 -0
- package/script/_dnt.test_shims.js +65 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/assertion_error.d.ts +26 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/assertion_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/assertion_error.js +34 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/equal.d.ts +17 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/equal.js +187 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/equals.d.ts +35 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/equals.js +61 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/false.d.ts +18 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/false.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/false.js +25 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/instance_of.d.ts +23 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/instance_of.js +56 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/is_error.d.ts +25 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/is_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/is_error.js +57 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/match.d.ts +18 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/match.js +29 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/not_instance_of.d.ts +20 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/not_instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/not_instance_of.js +32 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/not_match.d.ts +18 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/not_match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/not_match.js +29 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/not_strict_equals.d.ts +23 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/not_strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/not_strict_equals.js +35 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/rejects.d.ts +42 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/rejects.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/rejects.js +56 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/strict_equals.d.ts +24 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.9/strict_equals.js +60 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_assert_equals.d.ts +20 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_assert_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_assert_equals.js +32 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_assert_not_equals.d.ts +17 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_assert_not_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_assert_not_equals.js +29 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_assertions.d.ts +4 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_assertions.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_assertions.js +18 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_asymmetric_matchers.d.ts +46 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_asymmetric_matchers.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_asymmetric_matchers.js +182 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_build_message.d.ts +6 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_build_message.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_build_message.js +33 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_custom_equality_tester.d.ts +4 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_custom_equality_tester.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_custom_equality_tester.js +15 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_equal.d.ts +9 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_equal.js +194 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_extend.d.ts +4 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_extend.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_extend.js +15 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_inspect_args.d.ts +3 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_inspect_args.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_inspect_args.js +17 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_matchers.d.ts +34 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_matchers.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_matchers.js +602 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_mock_util.d.ts +11 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_mock_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_mock_util.js +14 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_serializer.d.ts +4 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_serializer.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_serializer.js +14 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_types.d.ts +839 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_types.js +4 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_utils.d.ts +9 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_utils.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/_utils.js +226 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/expect.d.ts +60 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/expect.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.9/expect.js +527 -0
- 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.5/build_message.d.ts +82 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.js +116 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +140 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.js +284 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +99 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.js +186 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts +2 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/format.js +41 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +159 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.js +220 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts +16 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/types.js +3 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/_mock_utils.d.ts +15 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/_mock_utils.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/_mock_utils.js +41 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/_test_suite.d.ts +74 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/_test_suite.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/_test_suite.js +355 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/bdd.d.ts +736 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/bdd.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/bdd.js +663 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/mock.d.ts +674 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/mock.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/testing/1.0.6/mock.js +1102 -0
- package/script/src/ast/nodes/annotation.test.d.ts +2 -0
- package/script/src/ast/nodes/annotation.test.d.ts.map +1 -0
- package/script/src/ast/nodes/annotation.test.js +58 -0
- package/script/src/ast/nodes/argument.test.d.ts +2 -0
- package/script/src/ast/nodes/argument.test.d.ts.map +1 -0
- package/script/src/ast/nodes/argument.test.js +35 -0
- package/script/src/ast/nodes/call.test.d.ts +2 -0
- package/script/src/ast/nodes/call.test.d.ts.map +1 -0
- package/script/src/ast/nodes/call.test.js +37 -0
- package/script/src/ast/nodes/class.test.d.ts +2 -0
- package/script/src/ast/nodes/class.test.d.ts.map +1 -0
- package/script/src/ast/nodes/class.test.js +221 -0
- package/script/src/ast/nodes/constructor.test.d.ts +2 -0
- package/script/src/ast/nodes/constructor.test.d.ts.map +1 -0
- package/script/src/ast/nodes/constructor.test.js +141 -0
- package/script/src/ast/nodes/doc-tag.test.d.ts +2 -0
- package/script/src/ast/nodes/doc-tag.test.d.ts.map +1 -0
- package/script/src/ast/nodes/doc-tag.test.js +69 -0
- package/script/src/ast/nodes/doc.test.d.ts +2 -0
- package/script/src/ast/nodes/doc.test.d.ts.map +1 -0
- package/script/src/ast/nodes/doc.test.js +35 -0
- package/script/src/ast/nodes/enum-value.test.d.ts +2 -0
- package/script/src/ast/nodes/enum-value.test.d.ts.map +1 -0
- package/script/src/ast/nodes/enum-value.test.js +117 -0
- package/script/src/ast/nodes/enum.test.d.ts +2 -0
- package/script/src/ast/nodes/enum.test.d.ts.map +1 -0
- package/script/src/ast/nodes/enum.test.js +131 -0
- package/script/src/ast/nodes/function.test.d.ts +2 -0
- package/script/src/ast/nodes/function.test.d.ts.map +1 -0
- package/script/src/ast/nodes/function.test.js +162 -0
- package/script/src/ast/nodes/generic-parameter.test.d.ts +2 -0
- package/script/src/ast/nodes/generic-parameter.test.d.ts.map +1 -0
- package/script/src/ast/nodes/generic-parameter.test.js +51 -0
- package/script/src/ast/nodes/init-block.test.d.ts +2 -0
- package/script/src/ast/nodes/init-block.test.d.ts.map +1 -0
- package/script/src/ast/nodes/init-block.test.js +30 -0
- package/script/src/ast/nodes/interface.test.d.ts +2 -0
- package/script/src/ast/nodes/interface.test.d.ts.map +1 -0
- package/script/src/ast/nodes/interface.test.js +123 -0
- package/script/src/ast/nodes/object.test.d.ts +2 -0
- package/script/src/ast/nodes/object.test.d.ts.map +1 -0
- package/script/src/ast/nodes/object.test.js +80 -0
- package/script/src/ast/nodes/parameter.test.d.ts +2 -0
- package/script/src/ast/nodes/parameter.test.d.ts.map +1 -0
- package/script/src/ast/nodes/parameter.test.js +154 -0
- package/script/src/ast/nodes/property.test.d.ts +2 -0
- package/script/src/ast/nodes/property.test.d.ts.map +1 -0
- package/script/src/ast/nodes/property.test.js +208 -0
- package/script/src/ast/nodes/reference.test.d.ts +2 -0
- package/script/src/ast/nodes/reference.test.d.ts.map +1 -0
- package/script/src/ast/nodes/reference.test.js +38 -0
- package/script/src/ast/nodes/string.test.d.ts +2 -0
- package/script/src/ast/nodes/string.test.d.ts.map +1 -0
- package/script/src/ast/nodes/string.test.js +50 -0
- package/script/src/generators/services/okhttp3-clients/okhttp3-client-generator.js +26 -26
- package/script/src/generators/services/spring-controllers/models.d.ts +1 -0
- package/script/src/generators/services/spring-controllers/models.d.ts.map +1 -1
- package/script/src/generators/services/spring-controllers/models.js +1 -0
- package/script/src/generators/services/spring-controllers/spring-controller-generator.d.ts +1 -1
- package/script/src/generators/services/spring-controllers/spring-controller-generator.d.ts.map +1 -1
- package/script/src/generators/services/spring-controllers/spring-controller-generator.js +12 -5
- package/script/src/import-collection.test.d.ts +2 -0
- package/script/src/import-collection.test.d.ts.map +1 -0
- package/script/src/import-collection.test.js +101 -0
- package/script/tests/openapi-models.test.d.ts +2 -0
- package/script/tests/openapi-models.test.d.ts.map +1 -0
- package/script/tests/openapi-models.test.js +48 -0
- package/src/_dnt.test_polyfills.ts +70 -0
- package/src/_dnt.test_shims.ts +64 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/assertion_error.ts +31 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/equal.ts +210 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/equals.ts +65 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/false.ts +26 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/instance_of.ts +64 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/is_error.ts +65 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/match.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/not_instance_of.ts +33 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/not_match.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/not_strict_equals.ts +42 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/rejects.ts +123 -0
- package/src/deps/jsr.io/@std/assert/1.0.9/strict_equals.ts +67 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_assert_equals.ts +38 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_assert_not_equals.ts +35 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_assertions.ts +18 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_asymmetric_matchers.ts +193 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_build_message.ts +51 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_custom_equality_tester.ts +19 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_equal.ts +230 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_extend.ts +16 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_inspect_args.ts +15 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_matchers.ts +838 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_mock_util.ts +22 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_serializer.ts +15 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_types.ts +919 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/_utils.ts +283 -0
- package/src/deps/jsr.io/@std/expect/1.0.9/expect.ts +620 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/assertion_state.ts +214 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/build_message.ts +134 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/diff.ts +317 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts +204 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/format.ts +39 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/styles.ts +233 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/types.ts +18 -0
- package/src/deps/jsr.io/@std/testing/1.0.6/_mock_utils.ts +43 -0
- package/src/deps/jsr.io/@std/testing/1.0.6/_test_suite.ts +410 -0
- package/src/deps/jsr.io/@std/testing/1.0.6/bdd.ts +1285 -0
- package/src/deps/jsr.io/@std/testing/1.0.6/mock.ts +1807 -0
- package/src/mod.ts +8 -0
- package/src/src/assets.ts +9 -0
- package/src/src/ast/_index.ts +66 -0
- package/src/src/ast/common.ts +1 -0
- package/src/src/ast/index.ts +1 -0
- package/src/src/ast/node.ts +10 -0
- package/src/src/ast/nodes/annotation.test.ts +69 -0
- package/src/src/ast/nodes/annotation.ts +79 -0
- package/src/src/ast/nodes/argument.test.ts +41 -0
- package/src/src/ast/nodes/argument.ts +62 -0
- package/src/src/ast/nodes/call.test.ts +44 -0
- package/src/src/ast/nodes/call.ts +66 -0
- package/src/src/ast/nodes/class.test.ts +274 -0
- package/src/src/ast/nodes/class.ts +178 -0
- package/src/src/ast/nodes/collection-literal.ts +49 -0
- package/src/src/ast/nodes/constructor.test.ts +178 -0
- package/src/src/ast/nodes/constructor.ts +126 -0
- package/src/src/ast/nodes/doc-tag.test.ts +84 -0
- package/src/src/ast/nodes/doc-tag.ts +138 -0
- package/src/src/ast/nodes/doc.test.ts +42 -0
- package/src/src/ast/nodes/doc.ts +111 -0
- package/src/src/ast/nodes/enum-value.test.ts +146 -0
- package/src/src/ast/nodes/enum-value.ts +100 -0
- package/src/src/ast/nodes/enum.test.ts +167 -0
- package/src/src/ast/nodes/enum.ts +163 -0
- package/src/src/ast/nodes/function.test.ts +194 -0
- package/src/src/ast/nodes/function.ts +176 -0
- package/src/src/ast/nodes/generic-parameter.test.ts +60 -0
- package/src/src/ast/nodes/generic-parameter.ts +54 -0
- package/src/src/ast/nodes/init-block.test.ts +36 -0
- package/src/src/ast/nodes/init-block.ts +38 -0
- package/src/src/ast/nodes/interface.test.ts +151 -0
- package/src/src/ast/nodes/interface.ts +133 -0
- package/src/src/ast/nodes/lambda-type.ts +68 -0
- package/src/src/ast/nodes/lambda.ts +68 -0
- package/src/src/ast/nodes/object.test.ts +101 -0
- package/src/src/ast/nodes/object.ts +102 -0
- package/src/src/ast/nodes/parameter.test.ts +191 -0
- package/src/src/ast/nodes/parameter.ts +118 -0
- package/src/src/ast/nodes/property.test.ts +253 -0
- package/src/src/ast/nodes/property.ts +225 -0
- package/src/src/ast/nodes/reference.test.ts +47 -0
- package/src/src/ast/nodes/reference.ts +178 -0
- package/src/src/ast/nodes/string.test.ts +61 -0
- package/src/src/ast/nodes/string.ts +114 -0
- package/src/src/ast/nodes/types.ts +23 -0
- package/src/src/ast/references/index.ts +8 -0
- package/src/src/ast/references/jackson.ts +16 -0
- package/src/src/ast/references/jakarta.ts +10 -0
- package/src/src/ast/references/java.ts +19 -0
- package/src/src/ast/references/kotlin.ts +40 -0
- package/src/src/ast/references/okhttp3.ts +5 -0
- package/src/src/ast/references/reactor.ts +5 -0
- package/src/src/ast/references/spring.ts +64 -0
- package/src/src/ast/references/swagger.ts +23 -0
- package/src/src/ast/utils/get-kotlin-builder-options.ts +19 -0
- package/src/src/ast/utils/to-kt-node.ts +31 -0
- package/src/src/ast/utils/write-kt-annotations.ts +15 -0
- package/src/src/ast/utils/write-kt-arguments.ts +45 -0
- package/src/src/ast/utils/write-kt-enum-values.ts +27 -0
- package/src/src/ast/utils/write-kt-generic-parameters.ts +12 -0
- package/src/src/ast/utils/write-kt-members.ts +25 -0
- package/src/src/ast/utils/write-kt-node.ts +37 -0
- package/src/src/ast/utils/write-kt-parameters.ts +25 -0
- package/src/src/common-results.ts +4 -0
- package/src/src/config.ts +41 -0
- package/src/src/file-builder.ts +108 -0
- package/src/src/generators/file-generator.ts +29 -0
- package/src/src/generators/index.ts +4 -0
- package/src/src/generators/models/args.ts +128 -0
- package/src/src/generators/models/index.ts +4 -0
- package/src/src/generators/models/model-generator.ts +602 -0
- package/src/src/generators/models/models-generator.ts +65 -0
- package/src/src/generators/models/models.ts +95 -0
- package/src/src/generators/services/okhttp3-clients/args.ts +78 -0
- package/src/src/generators/services/okhttp3-clients/index.ts +4 -0
- package/src/src/generators/services/okhttp3-clients/models.ts +62 -0
- package/src/src/generators/services/okhttp3-clients/okhttp3-client-generator.ts +557 -0
- package/src/src/generators/services/okhttp3-clients/okhttp3-clients-generator.ts +130 -0
- package/src/src/generators/services/okhttp3-clients/refs.ts +55 -0
- package/src/src/generators/services/spring-controllers/args.ts +88 -0
- package/src/src/generators/services/spring-controllers/index.ts +4 -0
- package/src/src/generators/services/spring-controllers/models.ts +66 -0
- package/src/src/generators/services/spring-controllers/spring-controller-generator.ts +754 -0
- package/src/src/generators/services/spring-controllers/spring-controllers-generator.ts +70 -0
- package/src/src/import-collection.test.ts +116 -0
- package/src/src/import-collection.ts +98 -0
- package/src/src/types.ts +3 -0
- package/src/src/utils.ts +39 -0
- package/src/tests/openapi-models.test.ts +63 -0
- package/test_runner.js +227 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bdd.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/testing/1.0.6/bdd.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgZG;AACH,OAAO,KAAK,OAAO,MAAM,mCAAmC,CAAC;AAK7D,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,YAAY,EACjB,KAAK,SAAS,EAEf,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AAE5D,uCAAuC;AACvC,MAAM,MAAM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AAC"}
|
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.it = it;
|
|
5
|
+
exports.test = test;
|
|
6
|
+
exports.beforeAll = beforeAll;
|
|
7
|
+
exports.before = before;
|
|
8
|
+
exports.afterAll = afterAll;
|
|
9
|
+
exports.after = after;
|
|
10
|
+
exports.beforeEach = beforeEach;
|
|
11
|
+
exports.afterEach = afterEach;
|
|
12
|
+
exports.describe = describe;
|
|
13
|
+
const assertion_state_js_1 = require("../../internal/1.0.5/assertion_state.js");
|
|
14
|
+
const assertion_error_js_1 = require("../../assert/1.0.9/assertion_error.js");
|
|
15
|
+
const _test_suite_js_1 = require("./_test_suite.js");
|
|
16
|
+
/** Generates an ItDefinition from ItArgs. */
|
|
17
|
+
function itDefinition(...args) {
|
|
18
|
+
var _a;
|
|
19
|
+
let [suiteOptionsOrNameOrFn, optionsOrNameOrFn, optionsOrFn, fn,] = args;
|
|
20
|
+
let suite = undefined;
|
|
21
|
+
let name;
|
|
22
|
+
let options;
|
|
23
|
+
if (typeof suiteOptionsOrNameOrFn === "object" &&
|
|
24
|
+
typeof suiteOptionsOrNameOrFn.symbol === "symbol") {
|
|
25
|
+
suite = suiteOptionsOrNameOrFn;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
fn = optionsOrFn;
|
|
29
|
+
optionsOrFn = optionsOrNameOrFn;
|
|
30
|
+
optionsOrNameOrFn = suiteOptionsOrNameOrFn;
|
|
31
|
+
}
|
|
32
|
+
if (typeof optionsOrNameOrFn === "string") {
|
|
33
|
+
name = optionsOrNameOrFn;
|
|
34
|
+
if (typeof optionsOrFn === "function") {
|
|
35
|
+
fn = optionsOrFn;
|
|
36
|
+
options = {};
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
options = optionsOrFn;
|
|
40
|
+
if (!fn)
|
|
41
|
+
fn = options.fn;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else if (typeof optionsOrNameOrFn === "function") {
|
|
45
|
+
fn = optionsOrNameOrFn;
|
|
46
|
+
name = fn.name;
|
|
47
|
+
options = {};
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
options = optionsOrNameOrFn;
|
|
51
|
+
if (typeof optionsOrFn === "function") {
|
|
52
|
+
fn = optionsOrFn;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
fn = options.fn;
|
|
56
|
+
}
|
|
57
|
+
name = (_a = options.name) !== null && _a !== void 0 ? _a : fn.name;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
...(suite !== undefined ? { suite } : {}),
|
|
61
|
+
...options,
|
|
62
|
+
name,
|
|
63
|
+
fn,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Registers an individual test case.
|
|
68
|
+
*
|
|
69
|
+
* @example Usage
|
|
70
|
+
* ```ts
|
|
71
|
+
* import { describe, it } from "@std/testing/bdd";
|
|
72
|
+
* import { assertEquals } from "@std/assert";
|
|
73
|
+
*
|
|
74
|
+
* describe("example", () => {
|
|
75
|
+
* it("should pass", () => {
|
|
76
|
+
* // test case
|
|
77
|
+
* assertEquals(2 + 2, 4);
|
|
78
|
+
* });
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @typeParam T The self type of the function to implement the test case
|
|
83
|
+
* @param args The test case
|
|
84
|
+
*/
|
|
85
|
+
function it(...args) {
|
|
86
|
+
if (_test_suite_js_1.TestSuiteInternal.runningCount > 0) {
|
|
87
|
+
throw new Error("Cannot register new test cases after already registered test cases start running");
|
|
88
|
+
}
|
|
89
|
+
const assertionState = (0, assertion_state_js_1.getAssertionState)();
|
|
90
|
+
const options = itDefinition(...args);
|
|
91
|
+
const { suite } = options;
|
|
92
|
+
const testSuite = suite
|
|
93
|
+
? _test_suite_js_1.TestSuiteInternal.suites.get(suite.symbol)
|
|
94
|
+
: _test_suite_js_1.TestSuiteInternal.current;
|
|
95
|
+
if (!_test_suite_js_1.TestSuiteInternal.started)
|
|
96
|
+
_test_suite_js_1.TestSuiteInternal.started = true;
|
|
97
|
+
if (testSuite) {
|
|
98
|
+
_test_suite_js_1.TestSuiteInternal.addStep(testSuite, options);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
const { name, fn, ignore, only, permissions, sanitizeExit, sanitizeOps, sanitizeResources, } = options;
|
|
102
|
+
const opts = {
|
|
103
|
+
name,
|
|
104
|
+
async fn(t) {
|
|
105
|
+
_test_suite_js_1.TestSuiteInternal.runningCount++;
|
|
106
|
+
try {
|
|
107
|
+
await fn.call({}, t);
|
|
108
|
+
}
|
|
109
|
+
finally {
|
|
110
|
+
_test_suite_js_1.TestSuiteInternal.runningCount--;
|
|
111
|
+
}
|
|
112
|
+
if (assertionState.checkAssertionErrorState()) {
|
|
113
|
+
throw new assertion_error_js_1.AssertionError("Expected at least one assertion to be called but received none");
|
|
114
|
+
}
|
|
115
|
+
if (assertionState.checkAssertionCountSatisfied()) {
|
|
116
|
+
throw new assertion_error_js_1.AssertionError(`Expected at least ${assertionState.assertionCount} assertion to be called, ` +
|
|
117
|
+
`but received ${assertionState.assertionTriggeredCount}`);
|
|
118
|
+
}
|
|
119
|
+
assertionState.resetAssertionState();
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
if (ignore !== undefined) {
|
|
123
|
+
opts.ignore = ignore;
|
|
124
|
+
}
|
|
125
|
+
if (only !== undefined) {
|
|
126
|
+
opts.only = only;
|
|
127
|
+
}
|
|
128
|
+
if (permissions !== undefined) {
|
|
129
|
+
opts.permissions = permissions;
|
|
130
|
+
}
|
|
131
|
+
if (sanitizeExit !== undefined) {
|
|
132
|
+
opts.sanitizeExit = sanitizeExit;
|
|
133
|
+
}
|
|
134
|
+
if (sanitizeOps !== undefined) {
|
|
135
|
+
opts.sanitizeOps = sanitizeOps;
|
|
136
|
+
}
|
|
137
|
+
if (sanitizeResources !== undefined) {
|
|
138
|
+
opts.sanitizeResources = sanitizeResources;
|
|
139
|
+
}
|
|
140
|
+
_test_suite_js_1.TestSuiteInternal.registerTest(opts);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Only execute this test case.
|
|
145
|
+
*
|
|
146
|
+
* @example Usage
|
|
147
|
+
* ```ts
|
|
148
|
+
* import { describe, it } from "@std/testing/bdd";
|
|
149
|
+
* import { assertEquals } from "@std/assert";
|
|
150
|
+
*
|
|
151
|
+
* describe("example", () => {
|
|
152
|
+
* it("should pass", () => {
|
|
153
|
+
* assertEquals(2 + 2, 4);
|
|
154
|
+
* });
|
|
155
|
+
*
|
|
156
|
+
* it.only("should pass too", () => {
|
|
157
|
+
* assertEquals(3 + 4, 7);
|
|
158
|
+
* });
|
|
159
|
+
* });
|
|
160
|
+
* ```
|
|
161
|
+
*
|
|
162
|
+
* @param args The test case
|
|
163
|
+
*/
|
|
164
|
+
it.only = function itOnly(...args) {
|
|
165
|
+
const options = itDefinition(...args);
|
|
166
|
+
return it({
|
|
167
|
+
...options,
|
|
168
|
+
only: true,
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Ignore this test case.
|
|
173
|
+
*
|
|
174
|
+
* @example Usage
|
|
175
|
+
* ```ts
|
|
176
|
+
* import { describe, it } from "@std/testing/bdd";
|
|
177
|
+
* import { assertEquals } from "@std/assert";
|
|
178
|
+
*
|
|
179
|
+
* describe("example", () => {
|
|
180
|
+
* it("should pass", () => {
|
|
181
|
+
* assertEquals(2 + 2, 4);
|
|
182
|
+
* });
|
|
183
|
+
*
|
|
184
|
+
* it.ignore("should pass too", () => {
|
|
185
|
+
* assertEquals(3 + 4, 7);
|
|
186
|
+
* });
|
|
187
|
+
* });
|
|
188
|
+
* ```
|
|
189
|
+
*
|
|
190
|
+
* @param args The test case
|
|
191
|
+
*/
|
|
192
|
+
it.ignore = function itIgnore(...args) {
|
|
193
|
+
const options = itDefinition(...args);
|
|
194
|
+
return it({
|
|
195
|
+
...options,
|
|
196
|
+
ignore: true,
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
/** Skip this test case.
|
|
200
|
+
*
|
|
201
|
+
* @example Usage
|
|
202
|
+
* ```ts
|
|
203
|
+
* import { describe, it } from "@std/testing/bdd";
|
|
204
|
+
* import { assertEquals } from "@std/assert";
|
|
205
|
+
*
|
|
206
|
+
* describe("example", () => {
|
|
207
|
+
* it("should pass", () => {
|
|
208
|
+
* assertEquals(2 + 2, 4);
|
|
209
|
+
* });
|
|
210
|
+
*
|
|
211
|
+
* it.skip("should pass too", () => {
|
|
212
|
+
* assertEquals(3 + 4, 7);
|
|
213
|
+
* });
|
|
214
|
+
* });
|
|
215
|
+
* ```
|
|
216
|
+
*
|
|
217
|
+
* @param args The test case
|
|
218
|
+
*/
|
|
219
|
+
it.skip = function itSkip(...args) {
|
|
220
|
+
it.ignore(...args);
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Alias of {@linkcode it}
|
|
224
|
+
*
|
|
225
|
+
* Registers an individual test case.
|
|
226
|
+
*
|
|
227
|
+
* @example Usage
|
|
228
|
+
* ```ts
|
|
229
|
+
* import { test } from "@std/testing/bdd";
|
|
230
|
+
* import { assertEquals } from "@std/assert";
|
|
231
|
+
*
|
|
232
|
+
* test("a test case", () => {
|
|
233
|
+
* // test case
|
|
234
|
+
* assertEquals(2 + 2, 4);
|
|
235
|
+
* });
|
|
236
|
+
* ```
|
|
237
|
+
*
|
|
238
|
+
* @typeParam T The self type of the function to implement the test case
|
|
239
|
+
* @param args The test case
|
|
240
|
+
*/
|
|
241
|
+
function test(...args) {
|
|
242
|
+
it(...args);
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Only execute this test case.
|
|
246
|
+
*
|
|
247
|
+
* @example Usage
|
|
248
|
+
* ```ts
|
|
249
|
+
* import { describe, test } from "@std/testing/bdd";
|
|
250
|
+
* import { assertEquals } from "@std/assert";
|
|
251
|
+
*
|
|
252
|
+
* describe("example", () => {
|
|
253
|
+
* test("should pass", () => {
|
|
254
|
+
* assertEquals(2 + 2, 4);
|
|
255
|
+
* });
|
|
256
|
+
*
|
|
257
|
+
* test.only("should pass too", () => {
|
|
258
|
+
* assertEquals(3 + 4, 7);
|
|
259
|
+
* });
|
|
260
|
+
* });
|
|
261
|
+
* ```
|
|
262
|
+
*
|
|
263
|
+
* @param args The test case
|
|
264
|
+
*/
|
|
265
|
+
test.only = function itOnly(...args) {
|
|
266
|
+
it.only(...args);
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* Ignore this test case.
|
|
270
|
+
*
|
|
271
|
+
* @example Usage
|
|
272
|
+
* ```ts
|
|
273
|
+
* import { describe, test } from "@std/testing/bdd";
|
|
274
|
+
* import { assertEquals } from "@std/assert";
|
|
275
|
+
*
|
|
276
|
+
* describe("example", () => {
|
|
277
|
+
* test("should pass", () => {
|
|
278
|
+
* assertEquals(2 + 2, 4);
|
|
279
|
+
* });
|
|
280
|
+
*
|
|
281
|
+
* test.ignore("should pass too", () => {
|
|
282
|
+
* assertEquals(3 + 4, 7);
|
|
283
|
+
* });
|
|
284
|
+
* });
|
|
285
|
+
* ```
|
|
286
|
+
*
|
|
287
|
+
* @param args The test case
|
|
288
|
+
*/
|
|
289
|
+
test.ignore = function itIgnore(...args) {
|
|
290
|
+
it.ignore(...args);
|
|
291
|
+
};
|
|
292
|
+
/** Skip this test case.
|
|
293
|
+
*
|
|
294
|
+
* @example Usage
|
|
295
|
+
* ```ts
|
|
296
|
+
* import { describe, test } from "@std/testing/bdd";
|
|
297
|
+
* import { assertEquals } from "@std/assert";
|
|
298
|
+
*
|
|
299
|
+
* describe("example", () => {
|
|
300
|
+
* test("should pass", () => {
|
|
301
|
+
* assertEquals(2 + 2, 4);
|
|
302
|
+
* });
|
|
303
|
+
*
|
|
304
|
+
* test.skip("should pass too", () => {
|
|
305
|
+
* assertEquals(3 + 4, 7);
|
|
306
|
+
* });
|
|
307
|
+
* });
|
|
308
|
+
* ```
|
|
309
|
+
*
|
|
310
|
+
* @param args The test case
|
|
311
|
+
*/
|
|
312
|
+
test.skip = function itSkip(...args) {
|
|
313
|
+
it.ignore(...args);
|
|
314
|
+
};
|
|
315
|
+
function addHook(name, fn) {
|
|
316
|
+
if (!_test_suite_js_1.TestSuiteInternal.current) {
|
|
317
|
+
if (_test_suite_js_1.TestSuiteInternal.started) {
|
|
318
|
+
throw new Error("Cannot add global hooks after a global test is registered");
|
|
319
|
+
}
|
|
320
|
+
_test_suite_js_1.TestSuiteInternal.current = new _test_suite_js_1.TestSuiteInternal({
|
|
321
|
+
name: "global",
|
|
322
|
+
[name]: fn,
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
_test_suite_js_1.TestSuiteInternal.setHook(_test_suite_js_1.TestSuiteInternal.current, name, fn);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Run some shared setup before all of the tests in the suite.
|
|
331
|
+
*
|
|
332
|
+
* @example Usage
|
|
333
|
+
* ```ts
|
|
334
|
+
* import { describe, it, beforeAll } from "@std/testing/bdd";
|
|
335
|
+
* import { assertEquals } from "@std/assert";
|
|
336
|
+
*
|
|
337
|
+
* beforeAll(() => {
|
|
338
|
+
* console.log("beforeAll");
|
|
339
|
+
* });
|
|
340
|
+
*
|
|
341
|
+
* describe("example", () => {
|
|
342
|
+
* it("should pass", () => {
|
|
343
|
+
* // test case
|
|
344
|
+
* assertEquals(2 + 2, 4);
|
|
345
|
+
* });
|
|
346
|
+
* });
|
|
347
|
+
* ```
|
|
348
|
+
*
|
|
349
|
+
* @typeParam T The self type of the function
|
|
350
|
+
* @param fn The function to implement the setup behavior.
|
|
351
|
+
*/
|
|
352
|
+
function beforeAll(fn) {
|
|
353
|
+
addHook("beforeAll", fn);
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Alias of {@linkcode beforeAll}
|
|
357
|
+
*
|
|
358
|
+
* Run some shared setup before all of the tests in the suite.
|
|
359
|
+
*
|
|
360
|
+
* @example Usage
|
|
361
|
+
* ```ts
|
|
362
|
+
* import { describe, it, before } from "@std/testing/bdd";
|
|
363
|
+
* import { assertEquals } from "@std/assert";
|
|
364
|
+
*
|
|
365
|
+
* before(() => {
|
|
366
|
+
* console.log("before");
|
|
367
|
+
* });
|
|
368
|
+
*
|
|
369
|
+
* describe("example", () => {
|
|
370
|
+
* it("should pass", () => {
|
|
371
|
+
* // test case
|
|
372
|
+
* assertEquals(2 + 2, 4);
|
|
373
|
+
* });
|
|
374
|
+
* });
|
|
375
|
+
* ```
|
|
376
|
+
*
|
|
377
|
+
* @typeParam T The self type of the function
|
|
378
|
+
* @param fn The function to implement the setup behavior.
|
|
379
|
+
*/
|
|
380
|
+
function before(fn) {
|
|
381
|
+
beforeAll(fn);
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Run some shared teardown after all of the tests in the suite.
|
|
385
|
+
*
|
|
386
|
+
* @example Usage
|
|
387
|
+
* ```ts
|
|
388
|
+
* import { describe, it, afterAll } from "@std/testing/bdd";
|
|
389
|
+
* import { assertEquals } from "@std/assert";
|
|
390
|
+
*
|
|
391
|
+
* afterAll(() => {
|
|
392
|
+
* console.log("afterAll");
|
|
393
|
+
* });
|
|
394
|
+
*
|
|
395
|
+
* describe("example", () => {
|
|
396
|
+
* it("should pass", () => {
|
|
397
|
+
* // test case
|
|
398
|
+
* assertEquals(2 + 2, 4);
|
|
399
|
+
* });
|
|
400
|
+
* });
|
|
401
|
+
* ```
|
|
402
|
+
*
|
|
403
|
+
* @typeParam T The self type of the function
|
|
404
|
+
* @param fn The function to implement the teardown behavior.
|
|
405
|
+
*/
|
|
406
|
+
function afterAll(fn) {
|
|
407
|
+
addHook("afterAll", fn);
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Alias of {@linkcode afterAll}.
|
|
411
|
+
*
|
|
412
|
+
* Run some shared teardown after all of the tests in the suite.
|
|
413
|
+
*
|
|
414
|
+
* @example Usage
|
|
415
|
+
* ```ts
|
|
416
|
+
* import { describe, it, after } from "@std/testing/bdd";
|
|
417
|
+
* import { assertEquals } from "@std/assert";
|
|
418
|
+
*
|
|
419
|
+
* after(() => {
|
|
420
|
+
* console.log("after");
|
|
421
|
+
* });
|
|
422
|
+
*
|
|
423
|
+
* describe("example", () => {
|
|
424
|
+
* it("should pass", () => {
|
|
425
|
+
* // test case
|
|
426
|
+
* assertEquals(2 + 2, 4);
|
|
427
|
+
* });
|
|
428
|
+
* });
|
|
429
|
+
* ```
|
|
430
|
+
*
|
|
431
|
+
* @typeParam T The self type of the function
|
|
432
|
+
* @param fn The function to implement the teardown behavior.
|
|
433
|
+
*/
|
|
434
|
+
function after(fn) {
|
|
435
|
+
afterAll(fn);
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Run some shared setup before each test in the suite.
|
|
439
|
+
*
|
|
440
|
+
* @example Usage
|
|
441
|
+
* ```ts
|
|
442
|
+
* import { describe, it, beforeEach } from "@std/testing/bdd";
|
|
443
|
+
* import { assertEquals } from "@std/assert";
|
|
444
|
+
*
|
|
445
|
+
* beforeEach(() => {
|
|
446
|
+
* console.log("beforeEach");
|
|
447
|
+
* });
|
|
448
|
+
*
|
|
449
|
+
* describe("example", () => {
|
|
450
|
+
* it("should pass", () => {
|
|
451
|
+
* // test case
|
|
452
|
+
* assertEquals(2 + 2, 4);
|
|
453
|
+
* });
|
|
454
|
+
* });
|
|
455
|
+
* ```
|
|
456
|
+
*
|
|
457
|
+
* @typeParam T The self type of the function
|
|
458
|
+
* @param fn The function to implement the shared setup behavior
|
|
459
|
+
*/
|
|
460
|
+
function beforeEach(fn) {
|
|
461
|
+
addHook("beforeEach", fn);
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Run some shared teardown after each test in the suite.
|
|
465
|
+
*
|
|
466
|
+
* @example Usage
|
|
467
|
+
* ```ts
|
|
468
|
+
* import { describe, it, afterEach } from "@std/testing/bdd";
|
|
469
|
+
* import { assertEquals } from "@std/assert";
|
|
470
|
+
*
|
|
471
|
+
* afterEach(() => {
|
|
472
|
+
* console.log("afterEach");
|
|
473
|
+
* });
|
|
474
|
+
*
|
|
475
|
+
* describe("example", () => {
|
|
476
|
+
* it("should pass", () => {
|
|
477
|
+
* // test case
|
|
478
|
+
* assertEquals(2 + 2, 4);
|
|
479
|
+
* });
|
|
480
|
+
* });
|
|
481
|
+
* ```
|
|
482
|
+
*
|
|
483
|
+
* @typeParam T The self type of the function
|
|
484
|
+
* @param fn The function to implement the shared teardown behavior
|
|
485
|
+
*/
|
|
486
|
+
function afterEach(fn) {
|
|
487
|
+
addHook("afterEach", fn);
|
|
488
|
+
}
|
|
489
|
+
/** Generates a DescribeDefinition from DescribeArgs. */
|
|
490
|
+
function describeDefinition(...args) {
|
|
491
|
+
var _a, _b;
|
|
492
|
+
let [suiteOptionsOrNameOrFn, optionsOrNameOrFn, optionsOrFn, fn,] = args;
|
|
493
|
+
let suite = undefined;
|
|
494
|
+
let name;
|
|
495
|
+
let options;
|
|
496
|
+
if (typeof suiteOptionsOrNameOrFn === "object" &&
|
|
497
|
+
typeof suiteOptionsOrNameOrFn.symbol === "symbol") {
|
|
498
|
+
suite = suiteOptionsOrNameOrFn;
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
fn = optionsOrFn;
|
|
502
|
+
optionsOrFn = optionsOrNameOrFn;
|
|
503
|
+
optionsOrNameOrFn = suiteOptionsOrNameOrFn;
|
|
504
|
+
}
|
|
505
|
+
if (typeof optionsOrNameOrFn === "string") {
|
|
506
|
+
name = optionsOrNameOrFn;
|
|
507
|
+
if (typeof optionsOrFn === "function") {
|
|
508
|
+
fn = optionsOrFn;
|
|
509
|
+
options = {};
|
|
510
|
+
}
|
|
511
|
+
else {
|
|
512
|
+
options = optionsOrFn !== null && optionsOrFn !== void 0 ? optionsOrFn : {};
|
|
513
|
+
if (fn === undefined) {
|
|
514
|
+
fn = options.fn;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
else if (typeof optionsOrNameOrFn === "function") {
|
|
519
|
+
fn = optionsOrNameOrFn;
|
|
520
|
+
name = fn.name;
|
|
521
|
+
options = {};
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
524
|
+
options = optionsOrNameOrFn !== null && optionsOrNameOrFn !== void 0 ? optionsOrNameOrFn : {};
|
|
525
|
+
if (typeof optionsOrFn === "function") {
|
|
526
|
+
fn = optionsOrFn;
|
|
527
|
+
}
|
|
528
|
+
else {
|
|
529
|
+
fn = options.fn;
|
|
530
|
+
}
|
|
531
|
+
name = (_b = (_a = options.name) !== null && _a !== void 0 ? _a : fn === null || fn === void 0 ? void 0 : fn.name) !== null && _b !== void 0 ? _b : "";
|
|
532
|
+
}
|
|
533
|
+
if (suite === undefined) {
|
|
534
|
+
suite = options.suite;
|
|
535
|
+
}
|
|
536
|
+
if (suite === undefined && _test_suite_js_1.TestSuiteInternal.current) {
|
|
537
|
+
const { symbol } = _test_suite_js_1.TestSuiteInternal.current;
|
|
538
|
+
suite = { symbol };
|
|
539
|
+
}
|
|
540
|
+
return {
|
|
541
|
+
...options,
|
|
542
|
+
suite: suite,
|
|
543
|
+
name,
|
|
544
|
+
fn: fn,
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Registers a test suite.
|
|
549
|
+
*
|
|
550
|
+
* @example Usage
|
|
551
|
+
* ```ts
|
|
552
|
+
* import { describe, it } from "@std/testing/bdd";
|
|
553
|
+
* import { assertEquals } from "@std/assert";
|
|
554
|
+
*
|
|
555
|
+
* describe("example", () => {
|
|
556
|
+
* it("should pass", () => {
|
|
557
|
+
* // test case
|
|
558
|
+
* assertEquals(2 + 2, 4);
|
|
559
|
+
* });
|
|
560
|
+
* });
|
|
561
|
+
* ```
|
|
562
|
+
*
|
|
563
|
+
* @typeParam T The self type of the test suite body.
|
|
564
|
+
* @param args The test suite body.
|
|
565
|
+
* @returns The test suite
|
|
566
|
+
*/
|
|
567
|
+
function describe(...args) {
|
|
568
|
+
if (_test_suite_js_1.TestSuiteInternal.runningCount > 0) {
|
|
569
|
+
throw new Error("Cannot register new test suites after already registered test cases start running");
|
|
570
|
+
}
|
|
571
|
+
const options = describeDefinition(...args);
|
|
572
|
+
if (!_test_suite_js_1.TestSuiteInternal.started)
|
|
573
|
+
_test_suite_js_1.TestSuiteInternal.started = true;
|
|
574
|
+
const { symbol } = new _test_suite_js_1.TestSuiteInternal(options);
|
|
575
|
+
return { symbol };
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Only execute this test suite.
|
|
579
|
+
*
|
|
580
|
+
* @example Usage
|
|
581
|
+
* ```ts
|
|
582
|
+
* import { describe, it, beforeAll } from "@std/testing/bdd";
|
|
583
|
+
* import { assertEquals } from "@std/assert";
|
|
584
|
+
*
|
|
585
|
+
* describe("example", () => {
|
|
586
|
+
* it("should pass", () => {
|
|
587
|
+
* assertEquals(2 + 2, 4);
|
|
588
|
+
* });
|
|
589
|
+
* });
|
|
590
|
+
*
|
|
591
|
+
* // Only this test suite will run
|
|
592
|
+
* describe.only("example 2", () => {
|
|
593
|
+
* it("should pass too", () => {
|
|
594
|
+
* assertEquals(3 + 4, 7);
|
|
595
|
+
* });
|
|
596
|
+
* });
|
|
597
|
+
* ```
|
|
598
|
+
*
|
|
599
|
+
* @param args The test suite body
|
|
600
|
+
*/
|
|
601
|
+
describe.only = function describeOnly(...args) {
|
|
602
|
+
const options = describeDefinition(...args);
|
|
603
|
+
return describe({
|
|
604
|
+
...options,
|
|
605
|
+
only: true,
|
|
606
|
+
});
|
|
607
|
+
};
|
|
608
|
+
/**
|
|
609
|
+
* Ignore the test suite.
|
|
610
|
+
*
|
|
611
|
+
* @example Usage
|
|
612
|
+
* ```ts
|
|
613
|
+
* import { describe, it, beforeAll } from "@std/testing/bdd";
|
|
614
|
+
* import { assertEquals } from "@std/assert";
|
|
615
|
+
*
|
|
616
|
+
* describe("example", () => {
|
|
617
|
+
* it("should pass", () => {
|
|
618
|
+
* assertEquals(2 + 2, 4);
|
|
619
|
+
* });
|
|
620
|
+
* });
|
|
621
|
+
*
|
|
622
|
+
* describe.ignore("example 2", () => {
|
|
623
|
+
* it("should pass too", () => {
|
|
624
|
+
* assertEquals(3 + 4, 7);
|
|
625
|
+
* });
|
|
626
|
+
* });
|
|
627
|
+
* ```
|
|
628
|
+
*
|
|
629
|
+
* @param args The test suite body
|
|
630
|
+
*/
|
|
631
|
+
describe.ignore = function describeIgnore(...args) {
|
|
632
|
+
const options = describeDefinition(...args);
|
|
633
|
+
return describe({
|
|
634
|
+
...options,
|
|
635
|
+
ignore: true,
|
|
636
|
+
});
|
|
637
|
+
};
|
|
638
|
+
/**
|
|
639
|
+
* Skip the test suite.
|
|
640
|
+
*
|
|
641
|
+
* @example Usage
|
|
642
|
+
* ```ts
|
|
643
|
+
* import { describe, it, beforeAll } from "@std/testing/bdd";
|
|
644
|
+
* import { assertEquals } from "@std/assert";
|
|
645
|
+
*
|
|
646
|
+
* describe("example", () => {
|
|
647
|
+
* it("should pass", () => {
|
|
648
|
+
* assertEquals(2 + 2, 4);
|
|
649
|
+
* });
|
|
650
|
+
* });
|
|
651
|
+
*
|
|
652
|
+
* describe.skip("example 2", () => {
|
|
653
|
+
* it("should pass too", () => {
|
|
654
|
+
* assertEquals(3 + 4, 7);
|
|
655
|
+
* });
|
|
656
|
+
* });
|
|
657
|
+
* ```
|
|
658
|
+
*
|
|
659
|
+
* @param args The test suite body
|
|
660
|
+
*/
|
|
661
|
+
describe.skip = function describeSkip(...args) {
|
|
662
|
+
return describe.ignore(...args);
|
|
663
|
+
};
|