@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.
Files changed (387) hide show
  1. package/esm/_dnt.test_polyfills.d.ts +11 -0
  2. package/esm/_dnt.test_polyfills.d.ts.map +1 -1
  3. package/esm/_dnt.test_polyfills.js +14 -0
  4. package/esm/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts.map +1 -0
  5. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/assertion_error.js +1 -1
  6. package/esm/deps/jsr.io/@std/assert/1.0.11/false.d.ts.map +1 -0
  7. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/false.js +1 -1
  8. package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts.map +1 -0
  9. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/instance_of.js +1 -1
  10. package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +1 -0
  11. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/match.js +1 -1
  12. package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +1 -0
  13. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_instance_of.js +1 -1
  14. package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +1 -0
  15. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_match.js +1 -1
  16. package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +1 -0
  17. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_strict_equals.js +2 -2
  18. package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +1 -0
  19. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/strict_equals.js +6 -6
  20. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts.map +1 -0
  21. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_equals.js +2 -2
  22. 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
  23. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts.map +1 -0
  24. package/esm/deps/jsr.io/@std/{assert/1.0.6/is_error.js → expect/1.0.12/_assert_is_error.js} +8 -19
  25. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts.map +1 -0
  26. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_not_equals.js +3 -3
  27. package/esm/deps/jsr.io/@std/expect/{1.0.5/_assertion.d.ts → 1.0.12/_assertions.d.ts} +2 -1
  28. package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts.map +1 -0
  29. package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.js +13 -0
  30. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_asymmetric_matchers.d.ts +14 -4
  31. package/esm/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts.map +1 -0
  32. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_asymmetric_matchers.js +54 -17
  33. package/esm/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts.map +1 -0
  34. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_build_message.js +9 -9
  35. package/esm/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts.map +1 -0
  36. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_custom_equality_tester.js +1 -1
  37. package/esm/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts.map +1 -0
  38. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_equal.js +8 -8
  39. package/esm/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts.map +1 -0
  40. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_extend.js +1 -1
  41. package/esm/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts.map +1 -0
  42. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_inspect_args.js +1 -1
  43. package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts.map +1 -0
  44. package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.js +714 -0
  45. package/esm/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts.map +1 -0
  46. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_mock_util.js +1 -1
  47. package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts +4 -0
  48. package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts.map +1 -0
  49. package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.js +10 -0
  50. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_types.d.ts +7 -2
  51. package/esm/deps/jsr.io/@std/expect/1.0.12/_types.d.ts.map +1 -0
  52. package/esm/deps/jsr.io/@std/expect/1.0.12/_types.js +3 -0
  53. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_utils.d.ts +1 -0
  54. package/esm/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts.map +1 -0
  55. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_utils.js +60 -1
  56. package/{script/deps/jsr.io/@std/expect/1.0.5 → esm/deps/jsr.io/@std/expect/1.0.12}/expect.d.ts +10 -1
  57. package/esm/deps/jsr.io/@std/expect/1.0.12/expect.d.ts.map +1 -0
  58. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/expect.js +101 -3
  59. package/esm/deps/jsr.io/@std/expect/1.0.12/fn.d.ts.map +1 -0
  60. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/fn.js +1 -1
  61. package/{script/deps/jsr.io/@std/expect/1.0.5 → esm/deps/jsr.io/@std/expect/1.0.12}/mod.d.ts +8 -7
  62. package/esm/deps/jsr.io/@std/expect/1.0.12/mod.d.ts.map +1 -0
  63. package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/mod.js +9 -8
  64. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +160 -0
  65. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
  66. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +199 -0
  67. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts.map +1 -1
  68. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts.map +1 -1
  69. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts.map +1 -1
  70. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts.map +1 -1
  71. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts.map +1 -1
  72. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts.map +1 -1
  73. package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/_test_suite.d.ts +6 -1
  74. package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +1 -0
  75. package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/_test_suite.js +45 -5
  76. package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/bdd.d.ts +12 -5
  77. 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
  78. package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/bdd.js +85 -7
  79. package/esm/src/collect/helpers.test.js +2 -2
  80. package/esm/src/transform/helpers.test.js +2 -2
  81. package/esm/src/utils/action-provider.test.js +2 -2
  82. package/esm/src/utils/asset-manager.d.ts +1 -0
  83. package/esm/src/utils/asset-manager.d.ts.map +1 -1
  84. package/esm/src/utils/asset-manager.js +1 -1
  85. package/esm/src/utils/common.utils.test.js +2 -2
  86. package/esm/src/utils/condition.test.js +2 -2
  87. package/esm/src/utils/endpoint.utils.test.js +2 -2
  88. package/esm/src/utils/factory.test.js +2 -2
  89. package/esm/src/utils/generator.utils.test.js +2 -2
  90. package/esm/src/utils/object.utils.test.js +2 -2
  91. package/esm/src/utils/schema.utils.test.js +59 -67
  92. package/esm/src/utils/source-builder.test.js +3 -4
  93. package/esm/src/utils/string-builder/string-builder.test.js +11 -12
  94. package/esm/src/utils/string.utils.test.js +2 -2
  95. package/esm/tests/openapi.test.js +1 -1
  96. package/package.json +2 -2
  97. package/script/_dnt.test_polyfills.d.ts +11 -0
  98. package/script/_dnt.test_polyfills.d.ts.map +1 -1
  99. package/script/_dnt.test_polyfills.js +14 -0
  100. package/script/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts.map +1 -0
  101. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/assertion_error.js +1 -1
  102. package/script/deps/jsr.io/@std/assert/1.0.11/false.d.ts.map +1 -0
  103. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/false.js +1 -1
  104. package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts.map +1 -0
  105. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/instance_of.js +1 -1
  106. package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +1 -0
  107. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/match.js +1 -1
  108. package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +1 -0
  109. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_instance_of.js +1 -1
  110. package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +1 -0
  111. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_match.js +1 -1
  112. package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +1 -0
  113. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_strict_equals.js +2 -2
  114. package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +1 -0
  115. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/strict_equals.js +6 -6
  116. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts.map +1 -0
  117. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_equals.js +2 -2
  118. 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
  119. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts.map +1 -0
  120. package/script/deps/jsr.io/@std/{assert/1.0.6/is_error.js → expect/1.0.12/_assert_is_error.js} +8 -19
  121. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts.map +1 -0
  122. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_not_equals.js +3 -3
  123. package/script/deps/jsr.io/@std/expect/{1.0.5/_assertion.d.ts → 1.0.12/_assertions.d.ts} +2 -1
  124. package/script/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts.map +1 -0
  125. package/script/deps/jsr.io/@std/expect/{1.0.5/_assertion.js → 1.0.12/_assertions.js} +7 -2
  126. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_asymmetric_matchers.d.ts +14 -4
  127. package/script/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts.map +1 -0
  128. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_asymmetric_matchers.js +61 -18
  129. package/script/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts.map +1 -0
  130. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_build_message.js +9 -9
  131. package/script/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts.map +1 -0
  132. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_custom_equality_tester.js +1 -1
  133. package/script/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts.map +1 -0
  134. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_equal.js +8 -8
  135. package/script/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts.map +1 -0
  136. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_extend.js +1 -1
  137. package/script/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts.map +1 -0
  138. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_inspect_args.js +1 -1
  139. package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts.map +1 -0
  140. package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.js +748 -0
  141. package/script/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts.map +1 -0
  142. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_mock_util.js +1 -1
  143. package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts +4 -0
  144. package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts.map +1 -0
  145. package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.js +14 -0
  146. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_types.d.ts +7 -2
  147. package/script/deps/jsr.io/@std/expect/1.0.12/_types.d.ts.map +1 -0
  148. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_types.js +1 -1
  149. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_utils.d.ts +1 -0
  150. package/script/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts.map +1 -0
  151. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_utils.js +61 -1
  152. package/{esm/deps/jsr.io/@std/expect/1.0.5 → script/deps/jsr.io/@std/expect/1.0.12}/expect.d.ts +10 -1
  153. package/script/deps/jsr.io/@std/expect/1.0.12/expect.d.ts.map +1 -0
  154. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/expect.js +103 -5
  155. package/script/deps/jsr.io/@std/expect/1.0.12/fn.d.ts.map +1 -0
  156. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/fn.js +1 -1
  157. package/{esm/deps/jsr.io/@std/expect/1.0.5 → script/deps/jsr.io/@std/expect/1.0.12}/mod.d.ts +8 -7
  158. package/script/deps/jsr.io/@std/expect/1.0.12/mod.d.ts.map +1 -0
  159. package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/mod.js +9 -8
  160. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +160 -0
  161. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
  162. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +204 -0
  163. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts.map +1 -1
  164. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts.map +1 -1
  165. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts.map +1 -1
  166. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts.map +1 -1
  167. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts.map +1 -1
  168. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts.map +1 -1
  169. package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/_test_suite.d.ts +6 -1
  170. package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +1 -0
  171. package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/_test_suite.js +46 -6
  172. package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/bdd.d.ts +12 -5
  173. 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
  174. package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/bdd.js +84 -6
  175. package/script/src/collect/helpers.test.js +2 -2
  176. package/script/src/transform/helpers.test.js +2 -2
  177. package/script/src/utils/action-provider.test.js +2 -2
  178. package/script/src/utils/asset-manager.d.ts +1 -0
  179. package/script/src/utils/asset-manager.d.ts.map +1 -1
  180. package/script/src/utils/asset-manager.js +1 -1
  181. package/script/src/utils/common.utils.test.js +2 -2
  182. package/script/src/utils/condition.test.js +2 -2
  183. package/script/src/utils/endpoint.utils.test.js +2 -2
  184. package/script/src/utils/factory.test.js +2 -2
  185. package/script/src/utils/generator.utils.test.js +2 -2
  186. package/script/src/utils/object.utils.test.js +2 -2
  187. package/script/src/utils/schema.utils.test.js +58 -66
  188. package/script/src/utils/source-builder.test.js +3 -4
  189. package/script/src/utils/string-builder/string-builder.test.js +11 -12
  190. package/script/src/utils/string.utils.test.js +2 -2
  191. package/script/tests/openapi.test.js +1 -1
  192. package/src/_dnt.test_polyfills.ts +27 -0
  193. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/assertion_error.ts +1 -1
  194. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/false.ts +1 -1
  195. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/instance_of.ts +1 -1
  196. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/match.ts +1 -1
  197. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_instance_of.ts +1 -1
  198. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_match.ts +1 -1
  199. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_strict_equals.ts +2 -2
  200. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/strict_equals.ts +6 -6
  201. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_equals.ts +2 -2
  202. package/src/deps/jsr.io/@std/{assert/1.0.6/is_error.ts → expect/1.0.12/_assert_is_error.ts} +8 -19
  203. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_not_equals.ts +3 -3
  204. package/src/deps/jsr.io/@std/expect/1.0.12/_assertions.ts +18 -0
  205. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_asymmetric_matchers.ts +69 -18
  206. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_build_message.ts +9 -9
  207. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_custom_equality_tester.ts +1 -1
  208. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_equal.ts +10 -9
  209. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_extend.ts +1 -1
  210. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_inspect_args.ts +1 -1
  211. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_matchers.ts +308 -108
  212. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_mock_util.ts +1 -1
  213. package/src/deps/jsr.io/@std/expect/1.0.12/_serializer.ts +15 -0
  214. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_types.ts +9 -3
  215. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_utils.ts +83 -1
  216. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/expect.ts +113 -4
  217. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/fn.ts +1 -1
  218. package/src/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/mod.ts +9 -8
  219. package/src/deps/jsr.io/@std/internal/1.0.5/assertion_state.ts +214 -0
  220. package/src/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/_test_suite.ts +68 -9
  221. package/src/deps/jsr.io/@std/testing/{1.0.3 → 1.0.9}/bdd.ts +98 -12
  222. package/src/src/collect/helpers.test.ts +2 -2
  223. package/src/src/transform/helpers.test.ts +2 -2
  224. package/src/src/utils/action-provider.test.ts +2 -2
  225. package/src/src/utils/asset-manager.ts +1 -1
  226. package/src/src/utils/common.utils.test.ts +2 -2
  227. package/src/src/utils/condition.test.ts +2 -2
  228. package/src/src/utils/endpoint.utils.test.ts +2 -2
  229. package/src/src/utils/factory.test.ts +2 -2
  230. package/src/src/utils/generator.utils.test.ts +2 -2
  231. package/src/src/utils/object.utils.test.ts +2 -2
  232. package/src/src/utils/schema.utils.test.ts +68 -67
  233. package/src/src/utils/source-builder.test.ts +3 -4
  234. package/src/src/utils/string-builder/string-builder.test.ts +11 -12
  235. package/src/src/utils/string.utils.test.ts +2 -2
  236. package/src/tests/openapi.test.ts +1 -1
  237. package/esm/deps/jsr.io/@std/assert/1.0.6/assertion_error.d.ts.map +0 -1
  238. package/esm/deps/jsr.io/@std/assert/1.0.6/equal.d.ts +0 -17
  239. package/esm/deps/jsr.io/@std/assert/1.0.6/equal.d.ts.map +0 -1
  240. package/esm/deps/jsr.io/@std/assert/1.0.6/equal.js +0 -136
  241. package/esm/deps/jsr.io/@std/assert/1.0.6/equals.d.ts +0 -22
  242. package/esm/deps/jsr.io/@std/assert/1.0.6/equals.d.ts.map +0 -1
  243. package/esm/deps/jsr.io/@std/assert/1.0.6/equals.js +0 -45
  244. package/esm/deps/jsr.io/@std/assert/1.0.6/false.d.ts.map +0 -1
  245. package/esm/deps/jsr.io/@std/assert/1.0.6/instance_of.d.ts.map +0 -1
  246. package/esm/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts.map +0 -1
  247. package/esm/deps/jsr.io/@std/assert/1.0.6/match.d.ts.map +0 -1
  248. package/esm/deps/jsr.io/@std/assert/1.0.6/not_instance_of.d.ts.map +0 -1
  249. package/esm/deps/jsr.io/@std/assert/1.0.6/not_match.d.ts.map +0 -1
  250. package/esm/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.d.ts.map +0 -1
  251. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts +0 -28
  252. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts.map +0 -1
  253. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.js +0 -159
  254. package/esm/deps/jsr.io/@std/assert/1.0.6/strict_equals.d.ts.map +0 -1
  255. package/esm/deps/jsr.io/@std/expect/1.0.5/_assert_equals.d.ts.map +0 -1
  256. package/esm/deps/jsr.io/@std/expect/1.0.5/_assert_not_equals.d.ts.map +0 -1
  257. package/esm/deps/jsr.io/@std/expect/1.0.5/_assertion.d.ts.map +0 -1
  258. package/esm/deps/jsr.io/@std/expect/1.0.5/_assertion.js +0 -9
  259. package/esm/deps/jsr.io/@std/expect/1.0.5/_asymmetric_matchers.d.ts.map +0 -1
  260. package/esm/deps/jsr.io/@std/expect/1.0.5/_build_message.d.ts.map +0 -1
  261. package/esm/deps/jsr.io/@std/expect/1.0.5/_custom_equality_tester.d.ts.map +0 -1
  262. package/esm/deps/jsr.io/@std/expect/1.0.5/_equal.d.ts.map +0 -1
  263. package/esm/deps/jsr.io/@std/expect/1.0.5/_extend.d.ts.map +0 -1
  264. package/esm/deps/jsr.io/@std/expect/1.0.5/_inspect_args.d.ts.map +0 -1
  265. package/esm/deps/jsr.io/@std/expect/1.0.5/_matchers.d.ts.map +0 -1
  266. package/esm/deps/jsr.io/@std/expect/1.0.5/_matchers.js +0 -564
  267. package/esm/deps/jsr.io/@std/expect/1.0.5/_mock_util.d.ts.map +0 -1
  268. package/esm/deps/jsr.io/@std/expect/1.0.5/_types.d.ts.map +0 -1
  269. package/esm/deps/jsr.io/@std/expect/1.0.5/_types.js +0 -3
  270. package/esm/deps/jsr.io/@std/expect/1.0.5/_utils.d.ts.map +0 -1
  271. package/esm/deps/jsr.io/@std/expect/1.0.5/expect.d.ts.map +0 -1
  272. package/esm/deps/jsr.io/@std/expect/1.0.5/fn.d.ts.map +0 -1
  273. package/esm/deps/jsr.io/@std/expect/1.0.5/mod.d.ts.map +0 -1
  274. package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts +0 -75
  275. package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts.map +0 -1
  276. package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.js +0 -101
  277. package/esm/deps/jsr.io/@std/testing/1.0.3/_test_suite.d.ts.map +0 -1
  278. package/script/deps/jsr.io/@std/assert/1.0.6/assertion_error.d.ts.map +0 -1
  279. package/script/deps/jsr.io/@std/assert/1.0.6/equal.d.ts +0 -17
  280. package/script/deps/jsr.io/@std/assert/1.0.6/equal.d.ts.map +0 -1
  281. package/script/deps/jsr.io/@std/assert/1.0.6/equal.js +0 -139
  282. package/script/deps/jsr.io/@std/assert/1.0.6/equals.d.ts +0 -22
  283. package/script/deps/jsr.io/@std/assert/1.0.6/equals.d.ts.map +0 -1
  284. package/script/deps/jsr.io/@std/assert/1.0.6/equals.js +0 -48
  285. package/script/deps/jsr.io/@std/assert/1.0.6/false.d.ts.map +0 -1
  286. package/script/deps/jsr.io/@std/assert/1.0.6/instance_of.d.ts.map +0 -1
  287. package/script/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts.map +0 -1
  288. package/script/deps/jsr.io/@std/assert/1.0.6/match.d.ts.map +0 -1
  289. package/script/deps/jsr.io/@std/assert/1.0.6/not_instance_of.d.ts.map +0 -1
  290. package/script/deps/jsr.io/@std/assert/1.0.6/not_match.d.ts.map +0 -1
  291. package/script/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.d.ts.map +0 -1
  292. package/script/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts +0 -28
  293. package/script/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts.map +0 -1
  294. package/script/deps/jsr.io/@std/assert/1.0.6/object_match.js +0 -162
  295. package/script/deps/jsr.io/@std/assert/1.0.6/strict_equals.d.ts.map +0 -1
  296. package/script/deps/jsr.io/@std/expect/1.0.5/_assert_equals.d.ts.map +0 -1
  297. package/script/deps/jsr.io/@std/expect/1.0.5/_assert_not_equals.d.ts.map +0 -1
  298. package/script/deps/jsr.io/@std/expect/1.0.5/_assertion.d.ts.map +0 -1
  299. package/script/deps/jsr.io/@std/expect/1.0.5/_asymmetric_matchers.d.ts.map +0 -1
  300. package/script/deps/jsr.io/@std/expect/1.0.5/_build_message.d.ts.map +0 -1
  301. package/script/deps/jsr.io/@std/expect/1.0.5/_custom_equality_tester.d.ts.map +0 -1
  302. package/script/deps/jsr.io/@std/expect/1.0.5/_equal.d.ts.map +0 -1
  303. package/script/deps/jsr.io/@std/expect/1.0.5/_extend.d.ts.map +0 -1
  304. package/script/deps/jsr.io/@std/expect/1.0.5/_inspect_args.d.ts.map +0 -1
  305. package/script/deps/jsr.io/@std/expect/1.0.5/_matchers.d.ts.map +0 -1
  306. package/script/deps/jsr.io/@std/expect/1.0.5/_matchers.js +0 -598
  307. package/script/deps/jsr.io/@std/expect/1.0.5/_mock_util.d.ts.map +0 -1
  308. package/script/deps/jsr.io/@std/expect/1.0.5/_types.d.ts.map +0 -1
  309. package/script/deps/jsr.io/@std/expect/1.0.5/_utils.d.ts.map +0 -1
  310. package/script/deps/jsr.io/@std/expect/1.0.5/expect.d.ts.map +0 -1
  311. package/script/deps/jsr.io/@std/expect/1.0.5/fn.d.ts.map +0 -1
  312. package/script/deps/jsr.io/@std/expect/1.0.5/mod.d.ts.map +0 -1
  313. package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts +0 -75
  314. package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts.map +0 -1
  315. package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.js +0 -106
  316. package/script/deps/jsr.io/@std/testing/1.0.3/_test_suite.d.ts.map +0 -1
  317. package/src/deps/jsr.io/@std/assert/1.0.6/equal.ts +0 -152
  318. package/src/deps/jsr.io/@std/assert/1.0.6/equals.ts +0 -52
  319. package/src/deps/jsr.io/@std/assert/1.0.6/object_match.ts +0 -202
  320. package/src/deps/jsr.io/@std/expect/1.0.5/_assertion.ts +0 -13
  321. package/src/deps/jsr.io/@std/internal/1.0.4/assertion_state.ts +0 -111
  322. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/assertion_error.d.ts +0 -0
  323. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/false.d.ts +0 -0
  324. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/instance_of.d.ts +0 -0
  325. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/match.d.ts +0 -0
  326. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_instance_of.d.ts +0 -0
  327. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_match.d.ts +0 -0
  328. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_strict_equals.d.ts +0 -0
  329. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/strict_equals.d.ts +0 -0
  330. /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_equals.d.ts +0 -0
  331. /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_not_equals.d.ts +0 -0
  332. /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_build_message.d.ts +0 -0
  333. /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_custom_equality_tester.d.ts +0 -0
  334. /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_equal.d.ts +0 -0
  335. /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_extend.d.ts +0 -0
  336. /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_inspect_args.d.ts +0 -0
  337. /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_matchers.d.ts +0 -0
  338. /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_mock_util.d.ts +0 -0
  339. /package/esm/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/fn.d.ts +0 -0
  340. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts +0 -0
  341. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.js +0 -0
  342. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts +0 -0
  343. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.js +0 -0
  344. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts +0 -0
  345. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.js +0 -0
  346. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts +0 -0
  347. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.js +0 -0
  348. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts +0 -0
  349. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.js +0 -0
  350. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts +0 -0
  351. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.js +0 -0
  352. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/assertion_error.d.ts +0 -0
  353. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/false.d.ts +0 -0
  354. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/instance_of.d.ts +0 -0
  355. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/match.d.ts +0 -0
  356. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_instance_of.d.ts +0 -0
  357. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_match.d.ts +0 -0
  358. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/not_strict_equals.d.ts +0 -0
  359. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.11}/strict_equals.d.ts +0 -0
  360. /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_equals.d.ts +0 -0
  361. /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_assert_not_equals.d.ts +0 -0
  362. /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_build_message.d.ts +0 -0
  363. /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_custom_equality_tester.d.ts +0 -0
  364. /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_equal.d.ts +0 -0
  365. /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_extend.d.ts +0 -0
  366. /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_inspect_args.d.ts +0 -0
  367. /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_matchers.d.ts +0 -0
  368. /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/_mock_util.d.ts +0 -0
  369. /package/script/deps/jsr.io/@std/expect/{1.0.5 → 1.0.12}/fn.d.ts +0 -0
  370. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts +0 -0
  371. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.js +0 -0
  372. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts +0 -0
  373. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.js +0 -0
  374. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts +0 -0
  375. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.js +0 -0
  376. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts +0 -0
  377. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.js +0 -0
  378. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts +0 -0
  379. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.js +0 -0
  380. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts +0 -0
  381. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.js +0 -0
  382. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.ts +0 -0
  383. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.ts +0 -0
  384. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.ts +0 -0
  385. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.ts +0 -0
  386. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.ts +0 -0
  387. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.ts +0 -0
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // deno-lint-ignore-file no-explicit-any
3
3
 
4
4
  export const MOCK_SYMBOL = Symbol.for("@MOCK");
@@ -0,0 +1,15 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+
3
+ import type { SnapshotPlugin } from "./_types.js";
4
+
5
+ const INTERNAL_PLUGINS: SnapshotPlugin[] = [
6
+ // TODO(eryue0220): support internal snapshot serializer plugins
7
+ ];
8
+
9
+ export function addSerializer(plugin: SnapshotPlugin) {
10
+ INTERNAL_PLUGINS.unshift(plugin);
11
+ }
12
+
13
+ export function getSerializer() {
14
+ return INTERNAL_PLUGINS;
15
+ }
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // deno-lint-ignore-file no-explicit-any
3
3
 
4
4
  export interface MatcherContext {
@@ -177,7 +177,10 @@ export interface Expected<IsAsync = false> {
177
177
  toBeCalledWith(...expected: unknown[]): void;
178
178
 
179
179
  /**
180
- * Asserts that the value is close to the specified number within a tolerance.
180
+ * Asserts that a given numerical value is approximately equal to an
181
+ * expected number within a certain margin of error
182
+ * (tolerance). Useful when comparing floating-point numbers, which
183
+ * may be represented internally with precision errors.
181
184
  *
182
185
  * @example Usage
183
186
  * ```ts
@@ -189,7 +192,8 @@ export interface Expected<IsAsync = false> {
189
192
  * ```
190
193
  *
191
194
  * @param candidate The candidate number.
192
- * @param tolerance The tolerance value (optional).
195
+ * @param tolerance The number of significant decimal digits to
196
+ * consider when comparing the values (optional, default 2).
193
197
  */
194
198
  toBeCloseTo(candidate: number, tolerance?: number): void;
195
199
 
@@ -915,3 +919,5 @@ export interface OldSnapshotPlugin {
915
919
  ) => string;
916
920
  test: Test;
917
921
  }
922
+
923
+ export type SnapshotPlugin = NewSnapshotPlugin | OldSnapshotPlugin;
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. MIT license.
3
3
 
4
4
  import type { EqualOptions, EqualOptionUtil } from "./_types.js";
@@ -40,6 +40,40 @@ function isObject(a: unknown) {
40
40
  return a !== null && typeof a === "object";
41
41
  }
42
42
 
43
+ function isObjectWithKeys(a: unknown) {
44
+ return (
45
+ isObject(a) &&
46
+ !(a instanceof Error) &&
47
+ !Array.isArray(a) &&
48
+ !(a instanceof Date) &&
49
+ !(a instanceof Set) &&
50
+ !(a instanceof Map)
51
+ );
52
+ }
53
+
54
+ function getObjectKeys(object: object): Array<string | symbol> {
55
+ return [
56
+ ...Object.keys(object),
57
+ ...Object.getOwnPropertySymbols(object).filter(
58
+ (s) => Object.getOwnPropertyDescriptor(object, s)?.enumerable,
59
+ ),
60
+ ];
61
+ }
62
+
63
+ function hasPropertyInObject(object: object, key: string | symbol): boolean {
64
+ const shouldTerminate = !object || typeof object !== "object" ||
65
+ object === Object.prototype;
66
+
67
+ if (shouldTerminate) {
68
+ return false;
69
+ }
70
+
71
+ return (
72
+ Object.prototype.hasOwnProperty.call(object, key) ||
73
+ hasPropertyInObject(Object.getPrototypeOf(object), key)
74
+ );
75
+ }
76
+
43
77
  // deno-lint-ignore no-explicit-any
44
78
  function entries(obj: any) {
45
79
  if (!isObject(obj)) return [];
@@ -199,3 +233,51 @@ export function iterableEquality(
199
233
  bStack.pop();
200
234
  return true;
201
235
  }
236
+
237
+ // Ported from https://github.com/jestjs/jest/blob/442c7f692e3a92f14a2fb56c1737b26fc663a0ef/packages/expect-utils/src/utils.ts#L341
238
+ export function subsetEquality(
239
+ object: unknown,
240
+ subset: unknown,
241
+ customTesters: Tester[] = [],
242
+ ): boolean | undefined {
243
+ const filteredCustomTesters = customTesters.filter((t) =>
244
+ t !== subsetEquality
245
+ );
246
+
247
+ const subsetEqualityWithContext =
248
+ (seenReferences: WeakMap<object, boolean> = new WeakMap()) =>
249
+ // deno-lint-ignore no-explicit-any
250
+ (object: any, subset: any): boolean | undefined => {
251
+ if (!isObjectWithKeys(subset)) {
252
+ return undefined;
253
+ }
254
+
255
+ if (seenReferences.has(subset)) return undefined;
256
+ seenReferences.set(subset, true);
257
+
258
+ const matchResult = getObjectKeys(subset).every((key) => {
259
+ if (isObjectWithKeys(subset[key])) {
260
+ if (seenReferences.has(subset[key])) {
261
+ return equal(object[key], subset[key], {
262
+ customTesters: filteredCustomTesters,
263
+ });
264
+ }
265
+ }
266
+ const result = object != null &&
267
+ hasPropertyInObject(object, key) &&
268
+ equal(object[key], subset[key], {
269
+ customTesters: [
270
+ ...filteredCustomTesters,
271
+ subsetEqualityWithContext(seenReferences),
272
+ ],
273
+ });
274
+ seenReferences.delete(subset[key]);
275
+ return result;
276
+ });
277
+ seenReferences.delete(subset);
278
+
279
+ return matchResult;
280
+ };
281
+
282
+ return subsetEqualityWithContext()(object, subset);
283
+ }
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  // Copyright 2019 Allain Lalonde. All rights reserved. ISC License.
4
4
  // Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -13,8 +13,12 @@ import type {
13
13
  MatcherKey,
14
14
  Matchers,
15
15
  } from "./_types.js";
16
- import { AssertionError } from "../../assert/1.0.6/assertion_error.js";
17
- import { emitAssertionTrigger, hasAssertions } from "./_assertion.js";
16
+ import { AssertionError } from "../../assert/1.0.11/assertion_error.js";
17
+ import {
18
+ assertions,
19
+ emitAssertionTrigger,
20
+ hasAssertions,
21
+ } from "./_assertions.js";
18
22
  import {
19
23
  addCustomEqualityTesters,
20
24
  getCustomEqualityTesters,
@@ -55,9 +59,10 @@ import {
55
59
  toStrictEqual,
56
60
  toThrow,
57
61
  } from "./_matchers.js";
62
+ import { addSerializer } from "./_serializer.js";
58
63
  import { isPromiseLike } from "./_utils.js";
59
64
  import * as asymmetricMatchers from "./_asymmetric_matchers.js";
60
- import type { Tester } from "./_types.js";
65
+ import type { SnapshotPlugin, Tester } from "./_types.js";
61
66
 
62
67
  export type { AnyConstructor, Async, Expected } from "./_types.js";
63
68
 
@@ -491,6 +496,7 @@ expect.stringContaining = asymmetricMatchers.stringContaining as (
491
496
  expect.stringMatching = asymmetricMatchers.stringMatching as (
492
497
  pattern: string | RegExp,
493
498
  ) => ReturnType<typeof asymmetricMatchers.stringMatching>;
499
+
494
500
  /**
495
501
  * `expect.hasAssertions` verifies that at least one assertion is called during a test.
496
502
  *
@@ -509,3 +515,106 @@ expect.stringMatching = asymmetricMatchers.stringMatching as (
509
515
  * ```
510
516
  */
511
517
  expect.hasAssertions = hasAssertions as () => void;
518
+
519
+ /**
520
+ * `expect.assertions` verifies that a certain number of assertions are called during a test.
521
+ *
522
+ * Note: expect.assertions only can use in bdd function test suite, such as `test` or `it`.
523
+ *
524
+ * @example
525
+ * ```ts
526
+ *
527
+ * import { test } from "@std/testing/bdd";
528
+ * import { expect } from "@std/expect";
529
+ *
530
+ * test("it works", () => {
531
+ * expect.assertions(1);
532
+ * expect("a").not.toBe("b");
533
+ * });
534
+ * ```
535
+ */
536
+ expect.assertions = assertions as (num: number) => void;
537
+
538
+ /**
539
+ * `expect.objectContaining(object)` matches any received object that recursively matches the expected properties.
540
+ * That is, the expected object is not a subset of the received object. Therefore, it matches a received object
541
+ * which contains properties that are not in the expected object.
542
+ *
543
+ * @example
544
+ * ```ts
545
+ * import { expect } from "@std/expect";
546
+ *
547
+ * Deno.test("example", () => {
548
+ * expect({ bar: 'baz' }).toEqual(expect.objectContaining({ bar: 'baz'}));
549
+ * expect({ bar: 'baz' }).not.toEqual(expect.objectContaining({ foo: 'bar'}));
550
+ * });
551
+ * ```
552
+ */
553
+ expect.objectContaining = asymmetricMatchers.objectContaining as (
554
+ obj: Record<string, unknown>,
555
+ ) => ReturnType<typeof asymmetricMatchers.objectContaining>;
556
+ /**
557
+ * `expect.not.arrayContaining` matches a received array which does not contain
558
+ * all of the elements in the expected array. That is, the expected array is not
559
+ * a subset of the received array.
560
+ *
561
+ * `expect.not.objectContaining` matches any received object that does not recursively
562
+ * match the expected properties. That is, the expected object is not a subset of the
563
+ * received object. Therefore, it matches a received object which contains properties
564
+ * that are not in the expected object.
565
+ *
566
+ * `expect.not.stringContaining` matches the received value if it is not a string
567
+ * or if it is a string that does not contain the exact expected string.
568
+ *
569
+ * `expect.not.stringMatching` matches the received value if it is not a string
570
+ * or if it is a string that does not match the expected string or regular expression.
571
+ *
572
+ * @example
573
+ * ```ts
574
+ * import { expect } from "@std/expect";
575
+ *
576
+ * Deno.test("expect.not.arrayContaining", () => {
577
+ * const expected = ["Samantha"];
578
+ * expect(["Alice", "Bob", "Eve"]).toEqual(expect.not.arrayContaining(expected));
579
+ * });
580
+ *
581
+ * Deno.test("expect.not.objectContaining", () => {
582
+ * const expected = { foo: "bar" };
583
+ * expect({ bar: "baz" }).toEqual(expect.not.objectContaining(expected));
584
+ * });
585
+ *
586
+ * Deno.test("expect.not.stringContaining", () => {
587
+ * const expected = "Hello world!";
588
+ * expect("How are you?").toEqual(expect.not.stringContaining(expected));
589
+ * });
590
+ *
591
+ * Deno.test("expect.not.stringMatching", () => {
592
+ * const expected = /Hello world!/;
593
+ * expect("How are you?").toEqual(expect.not.stringMatching(expected));
594
+ * });
595
+ * ```
596
+ */
597
+ expect.not = {
598
+ arrayContaining: asymmetricMatchers.arrayNotContaining,
599
+ objectContaining: asymmetricMatchers.objectNotContaining,
600
+ stringContaining: asymmetricMatchers.stringNotContaining,
601
+ stringMatching: asymmetricMatchers.stringNotMatching,
602
+ };
603
+ /**
604
+ * `expect.addSnapshotSerializer` adds a module that formats application-specific data structures.
605
+ *
606
+ * For an individual test file, an added module precedes any modules from snapshotSerializers configuration,
607
+ * which precede the default snapshot serializers for built-in JavaScript types.
608
+ * The last module added is the first module tested.
609
+ *
610
+ * @example
611
+ * ```ts
612
+ * import { expect } from "@std/expect";
613
+ * import serializerAnsi from "npm:jest-snapshot-serializer-ansi";
614
+ *
615
+ * expect.addSnapshotSerializer(serializerAnsi);
616
+ * ```
617
+ */
618
+ expect.addSnapshotSerializer = addSerializer as (
619
+ plugin: SnapshotPlugin,
620
+ ) => void;
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  // Copyright 2019 Allain Lalonde. All rights reserved. ISC License.
4
4
  // deno-lint-ignore-file no-explicit-any ban-types
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // Copyright 2019 Allain Lalonde. All rights reserved. ISC License.
3
3
  // This module is browser compatible.
4
4
 
@@ -54,26 +54,27 @@
54
54
  * - {@linkcode expect.anything}
55
55
  * - {@linkcode expect.any}
56
56
  * - {@linkcode expect.arrayContaining}
57
+ * - {@linkcode expect.not.arrayContaining}
58
+ * - {@linkcode expect.objectContaining}
59
+ * - {@linkcode expect.not.objectContaining}
57
60
  * - {@linkcode expect.closeTo}
58
61
  * - {@linkcode expect.stringContaining}
62
+ * - {@linkcode expect.not.stringContaining}
59
63
  * - {@linkcode expect.stringMatching}
64
+ * - {@linkcode expect.not.stringMatching}
60
65
  * - Utilities:
66
+ * - {@linkcode expect.addSnapshotSerializer}
67
+ * - {@linkcode expect.assertions}
61
68
  * - {@linkcode expect.addEqualityTester}
62
69
  * - {@linkcode expect.extend}
63
70
  * - {@linkcode expect.hasAssertions}
64
71
  *
65
72
  * Only these functions are still not available:
66
73
  * - Matchers:
67
- * - `toMatchSnapShot`
74
+ * - `toMatchSnapshot`
68
75
  * - `toMatchInlineSnapshot`
69
76
  * - `toThrowErrorMatchingSnapshot`
70
77
  * - `toThrowErrorMatchingInlineSnapshot`
71
- * - Asymmetric matchers:
72
- * - `expect.objectContaining`
73
- * - `expect.not.objectContaining`
74
- * - Utilities:
75
- * - `expect.assertions`
76
- * - `expect.addSnapshotSerializer`
77
78
  *
78
79
  * The tracking issue to add support for unsupported parts of the API is
79
80
  * {@link https://github.com/denoland/std/issues/3964}.
@@ -0,0 +1,214 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+
3
+ /**
4
+ * Check the test suite internal state
5
+ *
6
+ * @example Usage
7
+ * ```ts ignore
8
+ * import { AssertionState } from "@std/internal";
9
+ *
10
+ * const assertionState = new AssertionState();
11
+ * ```
12
+ */
13
+ export class AssertionState {
14
+ #state: {
15
+ assertionCount: number | undefined;
16
+ assertionCheck: boolean;
17
+ assertionTriggered: boolean;
18
+ assertionTriggeredCount: number;
19
+ };
20
+
21
+ constructor() {
22
+ this.#state = {
23
+ assertionCount: undefined,
24
+ assertionCheck: false,
25
+ assertionTriggered: false,
26
+ assertionTriggeredCount: 0,
27
+ };
28
+ }
29
+
30
+ /**
31
+ * Get the number that through `expect.assertions` api set.
32
+ *
33
+ * @returns the number that through `expect.assertions` api set.
34
+ *
35
+ * @example Usage
36
+ * ```ts ignore
37
+ * import { AssertionState } from "@std/internal";
38
+ *
39
+ * const assertionState = new AssertionState();
40
+ * assertionState.assertionCount;
41
+ * ```
42
+ */
43
+ get assertionCount(): number | undefined {
44
+ return this.#state.assertionCount;
45
+ }
46
+
47
+ /**
48
+ * Get a certain number that assertions were called before.
49
+ *
50
+ * @returns return a certain number that assertions were called before.
51
+ *
52
+ * @example Usage
53
+ * ```ts ignore
54
+ * import { AssertionState } from "@std/internal";
55
+ *
56
+ * const assertionState = new AssertionState();
57
+ * assertionState.assertionTriggeredCount;
58
+ * ```
59
+ */
60
+ get assertionTriggeredCount(): number {
61
+ return this.#state.assertionTriggeredCount;
62
+ }
63
+
64
+ /**
65
+ * If `expect.hasAssertions` called, then through this method to update #state.assertionCheck value.
66
+ *
67
+ * @param val Set #state.assertionCheck's value
68
+ *
69
+ * @example Usage
70
+ * ```ts ignore
71
+ * import { AssertionState } from "@std/internal";
72
+ *
73
+ * const assertionState = new AssertionState();
74
+ * assertionState.setAssertionCheck(true);
75
+ * ```
76
+ */
77
+ setAssertionCheck(val: boolean) {
78
+ this.#state.assertionCheck = val;
79
+ }
80
+
81
+ /**
82
+ * If any matchers was called, `#state.assertionTriggered` will be set through this method.
83
+ *
84
+ * @param val Set #state.assertionTriggered's value
85
+ *
86
+ * @example Usage
87
+ * ```ts ignore
88
+ * import { AssertionState } from "@std/internal";
89
+ *
90
+ * const assertionState = new AssertionState();
91
+ * assertionState.setAssertionTriggered(true);
92
+ * ```
93
+ */
94
+ setAssertionTriggered(val: boolean) {
95
+ this.#state.assertionTriggered = val;
96
+ }
97
+
98
+ /**
99
+ * If `expect.assertions` called, then through this method to update #state.assertionCheck value.
100
+ *
101
+ * @param num Set #state.assertionCount's value, for example if the value is set 2, that means
102
+ * you must have two assertion matchers call in your test suite.
103
+ *
104
+ * @example Usage
105
+ * ```ts ignore
106
+ * import { AssertionState } from "@std/internal";
107
+ *
108
+ * const assertionState = new AssertionState();
109
+ * assertionState.setAssertionCount(2);
110
+ * ```
111
+ */
112
+ setAssertionCount(num: number) {
113
+ this.#state.assertionCount = num;
114
+ }
115
+
116
+ /**
117
+ * If any matchers was called, `#state.assertionTriggeredCount` value will plus one internally.
118
+ *
119
+ * @example Usage
120
+ * ```ts ignore
121
+ * import { AssertionState } from "@std/internal";
122
+ *
123
+ * const assertionState = new AssertionState();
124
+ * assertionState.updateAssertionTriggerCount();
125
+ * ```
126
+ */
127
+ updateAssertionTriggerCount() {
128
+ if (this.#state.assertionCount !== undefined) {
129
+ this.#state.assertionTriggeredCount += 1;
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Check Assertion internal state, if `#state.assertionCheck` is set true, but
135
+ * `#state.assertionTriggered` is still false, then should throw an Assertion Error.
136
+ *
137
+ * @returns a boolean value, that the test suite is satisfied with the check. If not,
138
+ * it should throw an AssertionError.
139
+ *
140
+ * @example Usage
141
+ * ```ts ignore
142
+ * import { AssertionState } from "@std/internal";
143
+ *
144
+ * const assertionState = new AssertionState();
145
+ * if (assertionState.checkAssertionErrorState()) {
146
+ * // throw AssertionError("");
147
+ * }
148
+ * ```
149
+ */
150
+ checkAssertionErrorState(): boolean {
151
+ return this.#state.assertionCheck && !this.#state.assertionTriggered;
152
+ }
153
+
154
+ /**
155
+ * Reset all assertion state when every test suite function ran completely.
156
+ *
157
+ * @example Usage
158
+ * ```ts ignore
159
+ * import { AssertionState } from "@std/internal";
160
+ *
161
+ * const assertionState = new AssertionState();
162
+ * assertionState.resetAssertionState();
163
+ * ```
164
+ */
165
+ resetAssertionState(): void {
166
+ this.#state = {
167
+ assertionCount: undefined,
168
+ assertionCheck: false,
169
+ assertionTriggered: false,
170
+ assertionTriggeredCount: 0,
171
+ };
172
+ }
173
+
174
+ /**
175
+ * Check Assertion called state, if `#state.assertionCount` is set to a number value, but
176
+ * `#state.assertionTriggeredCount` is less then it, then should throw an assertion error.
177
+ *
178
+ * @returns a boolean value, that the test suite is satisfied with the check. If not,
179
+ * it should throw an AssertionError.
180
+ *
181
+ * @example Usage
182
+ * ```ts ignore
183
+ * import { AssertionState } from "@std/internal";
184
+ *
185
+ * const assertionState = new AssertionState();
186
+ * if (assertionState.checkAssertionCountSatisfied()) {
187
+ * // throw AssertionError("");
188
+ * }
189
+ * ```
190
+ */
191
+ checkAssertionCountSatisfied(): boolean {
192
+ return this.#state.assertionCount !== undefined &&
193
+ this.#state.assertionCount !== this.#state.assertionTriggeredCount;
194
+ }
195
+ }
196
+
197
+ const assertionState = new AssertionState();
198
+
199
+ /**
200
+ * return an instance of AssertionState
201
+ *
202
+ * @returns AssertionState
203
+ *
204
+ * @example Usage
205
+ * ```ts ignore
206
+ * import { getAssertionState } from "@std/internal";
207
+ *
208
+ * const assertionState = getAssertionState();
209
+ * assertionState.setAssertionTriggered(true);
210
+ * ```
211
+ */
212
+ export function getAssertionState(): AssertionState {
213
+ return assertionState;
214
+ }
@@ -1,7 +1,18 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- /** The options for creating a test suite with the describe function. */
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
2
  import * as dntShim from "../../../../../_dnt.test_shims.js";
4
3
 
4
+
5
+ import { getAssertionState } from "../../internal/1.0.5/assertion_state.js";
6
+ import { AssertionError } from "../../assert/1.0.11/assertion_error.js";
7
+
8
+ export const globalSanitizersState = {
9
+ sanitizeExit: undefined as boolean | undefined,
10
+ sanitizeOps: undefined as boolean | undefined,
11
+ sanitizeResources: undefined as boolean | undefined,
12
+ };
13
+ const assertionState = getAssertionState();
14
+
15
+ /** The options for creating a test suite with the describe function. */
5
16
  export interface DescribeDefinition<T> extends Omit<dntShim.Deno.TestDefinition, "fn"> {
6
17
  /** The body of the test suite */
7
18
  fn?: () => void | undefined;
@@ -78,7 +89,40 @@ export class TestSuiteInternal<T> implements TestSuite<T> {
78
89
  this.symbol = Symbol();
79
90
  TestSuiteInternal.suites.set(this.symbol, this);
80
91
 
81
- const { fn } = describe;
92
+ const { fn, ignore } = describe;
93
+ if (ignore) {
94
+ const {
95
+ name,
96
+ only,
97
+ permissions,
98
+ sanitizeExit = globalSanitizersState.sanitizeExit,
99
+ sanitizeOps = globalSanitizersState.sanitizeOps,
100
+ sanitizeResources = globalSanitizersState.sanitizeResources,
101
+ } = describe;
102
+ const options: dntShim.Deno.TestDefinition = {
103
+ name,
104
+ fn: async () => {},
105
+ ignore: true,
106
+ };
107
+ if (only !== undefined) {
108
+ options.only = only;
109
+ }
110
+ if (permissions !== undefined) {
111
+ options.permissions = permissions;
112
+ }
113
+ if (sanitizeExit !== undefined) {
114
+ options.sanitizeExit = sanitizeExit;
115
+ }
116
+ if (sanitizeOps !== undefined) {
117
+ options.sanitizeOps = sanitizeOps;
118
+ }
119
+ if (sanitizeResources !== undefined) {
120
+ options.sanitizeResources = sanitizeResources;
121
+ }
122
+ TestSuiteInternal.registerTest(options);
123
+ return;
124
+ }
125
+
82
126
  if (fn) {
83
127
  const temp = TestSuiteInternal.current;
84
128
  TestSuiteInternal.current = this;
@@ -102,9 +146,9 @@ export class TestSuiteInternal<T> implements TestSuite<T> {
102
146
  name,
103
147
  ignore,
104
148
  permissions,
105
- sanitizeExit,
106
- sanitizeOps,
107
- sanitizeResources,
149
+ sanitizeExit = globalSanitizersState.sanitizeExit,
150
+ sanitizeOps = globalSanitizersState.sanitizeOps,
151
+ sanitizeResources = globalSanitizersState.sanitizeResources,
108
152
  } = describe;
109
153
  let { only } = describe;
110
154
  if (!ignore && this.hasOnlyStep) {
@@ -294,9 +338,9 @@ export class TestSuiteInternal<T> implements TestSuite<T> {
294
338
  fn,
295
339
  ignore,
296
340
  permissions,
297
- sanitizeExit,
298
- sanitizeOps,
299
- sanitizeResources,
341
+ sanitizeExit = globalSanitizersState.sanitizeExit,
342
+ sanitizeOps = globalSanitizersState.sanitizeOps,
343
+ sanitizeResources = globalSanitizersState.sanitizeResources,
300
344
  } = step instanceof TestSuiteInternal ? step.describe : step;
301
345
 
302
346
  const options: dntShim.Deno.TestStepDefinition = {
@@ -385,5 +429,20 @@ export class TestSuiteInternal<T> implements TestSuite<T> {
385
429
  } else {
386
430
  await fn.call(context, t);
387
431
  }
432
+
433
+ if (assertionState.checkAssertionErrorState()) {
434
+ throw new AssertionError(
435
+ "Expected at least one assertion to be called but received none",
436
+ );
437
+ }
438
+
439
+ if (assertionState.checkAssertionCountSatisfied()) {
440
+ throw new AssertionError(
441
+ `Expected at least ${assertionState.assertionCount} assertion to be called, ` +
442
+ `but received ${assertionState.assertionTriggeredCount}`,
443
+ );
444
+ }
445
+
446
+ assertionState.resetAssertionState();
388
447
  }
389
448
  }