@goast/kotlin 0.4.2 → 0.4.3

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 (345) hide show
  1. package/{script/deps/jsr.io/@std/assert/1.0.6 → esm/deps/jsr.io/@std/assert/1.0.7}/assertion_error.d.ts.map +1 -1
  2. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equal.d.ts.map +1 -1
  3. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equals.d.ts.map +1 -1
  4. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equals.js +4 -4
  5. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/false.d.ts.map +1 -1
  6. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/instance_of.d.ts.map +1 -1
  7. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/is_error.d.ts.map +1 -1
  8. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/is_error.js +2 -2
  9. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/match.d.ts.map +1 -1
  10. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_instance_of.d.ts.map +1 -1
  11. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_match.d.ts.map +1 -1
  12. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_strict_equals.d.ts.map +1 -1
  13. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_strict_equals.js +1 -1
  14. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/rejects.d.ts.map +1 -1
  15. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/strict_equals.d.ts.map +1 -1
  16. package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/strict_equals.js +5 -5
  17. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_equals.d.ts.map +1 -1
  18. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_equals.js +1 -1
  19. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_not_equals.d.ts.map +1 -1
  20. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_not_equals.js +1 -1
  21. package/esm/deps/jsr.io/@std/expect/{1.0.6/_assertion.d.ts → 1.0.7/_assertions.d.ts} +2 -1
  22. package/esm/deps/jsr.io/@std/expect/1.0.7/_assertions.d.ts.map +1 -0
  23. package/esm/deps/jsr.io/@std/expect/{1.0.6/_assertion.js → 1.0.7/_assertions.js} +5 -1
  24. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_asymmetric_matchers.d.ts +10 -5
  25. package/esm/deps/jsr.io/@std/expect/1.0.7/_asymmetric_matchers.d.ts.map +1 -0
  26. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_asymmetric_matchers.js +37 -20
  27. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_build_message.d.ts.map +1 -1
  28. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_build_message.js +4 -4
  29. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_custom_equality_tester.d.ts.map +1 -1
  30. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_equal.d.ts.map +1 -1
  31. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_equal.js +7 -7
  32. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_extend.d.ts.map +1 -1
  33. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_inspect_args.d.ts.map +1 -1
  34. package/esm/deps/jsr.io/@std/expect/1.0.7/_matchers.d.ts.map +1 -0
  35. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_matchers.js +31 -32
  36. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_mock_util.d.ts.map +1 -1
  37. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_types.d.ts.map +1 -1
  38. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_utils.d.ts +1 -0
  39. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_utils.d.ts.map +1 -1
  40. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_utils.js +59 -0
  41. package/{script/deps/jsr.io/@std/expect/1.0.6 → esm/deps/jsr.io/@std/expect/1.0.7}/expect.d.ts +7 -0
  42. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/expect.d.ts.map +1 -1
  43. package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/expect.js +67 -2
  44. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +160 -0
  45. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
  46. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +199 -0
  47. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts.map +1 -1
  48. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts.map +1 -1
  49. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts.map +1 -1
  50. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts.map +1 -1
  51. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts.map +1 -1
  52. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts.map +1 -1
  53. package/esm/deps/jsr.io/@std/testing/1.0.4/_mock_utils.d.ts +15 -0
  54. package/esm/deps/jsr.io/@std/testing/1.0.4/_mock_utils.d.ts.map +1 -0
  55. package/esm/deps/jsr.io/@std/testing/1.0.4/_mock_utils.js +35 -0
  56. package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/_test_suite.d.ts +1 -1
  57. package/{script/deps/jsr.io/@std/testing/1.0.3 → esm/deps/jsr.io/@std/testing/1.0.4}/_test_suite.d.ts.map +1 -1
  58. package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/_test_suite.js +11 -1
  59. package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/bdd.d.ts.map +1 -1
  60. package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/bdd.js +8 -3
  61. package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/mock.d.ts.map +1 -1
  62. package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/mock.js +5 -39
  63. package/esm/src/ast/nodes/annotation.test.js +2 -2
  64. package/esm/src/ast/nodes/argument.test.js +2 -2
  65. package/esm/src/ast/nodes/call.test.js +2 -2
  66. package/esm/src/ast/nodes/class.test.js +2 -2
  67. package/esm/src/ast/nodes/constructor.test.js +2 -2
  68. package/esm/src/ast/nodes/doc-tag.test.js +2 -2
  69. package/esm/src/ast/nodes/doc.test.js +2 -2
  70. package/esm/src/ast/nodes/enum-value.test.js +2 -2
  71. package/esm/src/ast/nodes/enum.test.js +2 -2
  72. package/esm/src/ast/nodes/function.test.js +2 -2
  73. package/esm/src/ast/nodes/generic-parameter.test.js +2 -2
  74. package/esm/src/ast/nodes/init-block.test.js +2 -2
  75. package/esm/src/ast/nodes/interface.test.js +2 -2
  76. package/esm/src/ast/nodes/object.test.js +2 -2
  77. package/esm/src/ast/nodes/parameter.test.js +2 -2
  78. package/esm/src/ast/nodes/property.test.js +2 -2
  79. package/esm/src/ast/nodes/reference.test.js +2 -2
  80. package/esm/src/ast/nodes/string.test.js +2 -2
  81. package/esm/src/generators/services/spring-controllers/spring-controller-generator.d.ts.map +1 -1
  82. package/esm/src/generators/services/spring-controllers/spring-controller-generator.js +11 -7
  83. package/esm/src/import-collection.test.js +2 -2
  84. package/esm/tests/openapi-models.test.js +2 -2
  85. package/package.json +1 -1
  86. package/{esm/deps/jsr.io/@std/assert/1.0.6 → script/deps/jsr.io/@std/assert/1.0.7}/assertion_error.d.ts.map +1 -1
  87. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equal.d.ts.map +1 -1
  88. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equals.d.ts.map +1 -1
  89. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equals.js +4 -4
  90. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/false.d.ts.map +1 -1
  91. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/instance_of.d.ts.map +1 -1
  92. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/is_error.d.ts.map +1 -1
  93. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/is_error.js +2 -2
  94. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/match.d.ts.map +1 -1
  95. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_instance_of.d.ts.map +1 -1
  96. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_match.d.ts.map +1 -1
  97. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_strict_equals.d.ts.map +1 -1
  98. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_strict_equals.js +1 -1
  99. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/rejects.d.ts.map +1 -1
  100. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/strict_equals.d.ts.map +1 -1
  101. package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/strict_equals.js +5 -5
  102. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_equals.d.ts.map +1 -1
  103. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_equals.js +1 -1
  104. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_not_equals.d.ts.map +1 -1
  105. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_not_equals.js +1 -1
  106. package/script/deps/jsr.io/@std/expect/{1.0.6/_assertion.d.ts → 1.0.7/_assertions.d.ts} +2 -1
  107. package/script/deps/jsr.io/@std/expect/1.0.7/_assertions.d.ts.map +1 -0
  108. package/script/deps/jsr.io/@std/expect/{1.0.6/_assertion.js → 1.0.7/_assertions.js} +6 -1
  109. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_asymmetric_matchers.d.ts +10 -5
  110. package/script/deps/jsr.io/@std/expect/1.0.7/_asymmetric_matchers.d.ts.map +1 -0
  111. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_asymmetric_matchers.js +41 -20
  112. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_build_message.d.ts.map +1 -1
  113. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_build_message.js +4 -4
  114. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_custom_equality_tester.d.ts.map +1 -1
  115. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_equal.d.ts.map +1 -1
  116. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_equal.js +7 -7
  117. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_extend.d.ts.map +1 -1
  118. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_inspect_args.d.ts.map +1 -1
  119. package/script/deps/jsr.io/@std/expect/1.0.7/_matchers.d.ts.map +1 -0
  120. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_matchers.js +30 -31
  121. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_mock_util.d.ts.map +1 -1
  122. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_types.d.ts.map +1 -1
  123. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_utils.d.ts +1 -0
  124. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_utils.d.ts.map +1 -1
  125. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_utils.js +60 -0
  126. package/{esm/deps/jsr.io/@std/expect/1.0.6 → script/deps/jsr.io/@std/expect/1.0.7}/expect.d.ts +7 -0
  127. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/expect.d.ts.map +1 -1
  128. package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/expect.js +69 -4
  129. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +160 -0
  130. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
  131. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +204 -0
  132. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts.map +1 -1
  133. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts.map +1 -1
  134. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts.map +1 -1
  135. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts.map +1 -1
  136. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts.map +1 -1
  137. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts.map +1 -1
  138. package/script/deps/jsr.io/@std/testing/1.0.4/_mock_utils.d.ts +15 -0
  139. package/script/deps/jsr.io/@std/testing/1.0.4/_mock_utils.d.ts.map +1 -0
  140. package/script/deps/jsr.io/@std/testing/1.0.4/_mock_utils.js +41 -0
  141. package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/_test_suite.d.ts +1 -1
  142. package/{esm/deps/jsr.io/@std/testing/1.0.3 → script/deps/jsr.io/@std/testing/1.0.4}/_test_suite.d.ts.map +1 -1
  143. package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/_test_suite.js +11 -1
  144. package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/bdd.d.ts.map +1 -1
  145. package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/bdd.js +8 -3
  146. package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/mock.d.ts.map +1 -1
  147. package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/mock.js +20 -54
  148. package/script/src/ast/nodes/annotation.test.js +2 -2
  149. package/script/src/ast/nodes/argument.test.js +2 -2
  150. package/script/src/ast/nodes/call.test.js +2 -2
  151. package/script/src/ast/nodes/class.test.js +2 -2
  152. package/script/src/ast/nodes/constructor.test.js +2 -2
  153. package/script/src/ast/nodes/doc-tag.test.js +2 -2
  154. package/script/src/ast/nodes/doc.test.js +2 -2
  155. package/script/src/ast/nodes/enum-value.test.js +2 -2
  156. package/script/src/ast/nodes/enum.test.js +2 -2
  157. package/script/src/ast/nodes/function.test.js +2 -2
  158. package/script/src/ast/nodes/generic-parameter.test.js +2 -2
  159. package/script/src/ast/nodes/init-block.test.js +2 -2
  160. package/script/src/ast/nodes/interface.test.js +2 -2
  161. package/script/src/ast/nodes/object.test.js +2 -2
  162. package/script/src/ast/nodes/parameter.test.js +2 -2
  163. package/script/src/ast/nodes/property.test.js +2 -2
  164. package/script/src/ast/nodes/reference.test.js +2 -2
  165. package/script/src/ast/nodes/string.test.js +2 -2
  166. package/script/src/generators/services/spring-controllers/spring-controller-generator.d.ts.map +1 -1
  167. package/script/src/generators/services/spring-controllers/spring-controller-generator.js +11 -7
  168. package/script/src/import-collection.test.js +2 -2
  169. package/script/tests/openapi-models.test.js +2 -2
  170. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equals.ts +4 -4
  171. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/is_error.ts +2 -2
  172. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_strict_equals.ts +1 -1
  173. package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/strict_equals.ts +5 -5
  174. package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_equals.ts +1 -1
  175. package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_not_equals.ts +1 -1
  176. package/src/deps/jsr.io/@std/expect/{1.0.6/_assertion.ts → 1.0.7/_assertions.ts} +6 -1
  177. package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_asymmetric_matchers.ts +37 -21
  178. package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_build_message.ts +4 -4
  179. package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_equal.ts +9 -8
  180. package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_matchers.ts +42 -38
  181. package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_utils.ts +82 -0
  182. package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/expect.ts +74 -2
  183. package/src/deps/jsr.io/@std/internal/1.0.5/assertion_state.ts +214 -0
  184. package/src/deps/jsr.io/@std/testing/1.0.4/_mock_utils.ts +43 -0
  185. package/src/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/_test_suite.ts +22 -1
  186. package/src/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/bdd.ts +12 -3
  187. package/src/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/mock.ts +10 -42
  188. package/src/src/ast/nodes/annotation.test.ts +2 -2
  189. package/src/src/ast/nodes/argument.test.ts +2 -2
  190. package/src/src/ast/nodes/call.test.ts +2 -2
  191. package/src/src/ast/nodes/class.test.ts +2 -2
  192. package/src/src/ast/nodes/constructor.test.ts +2 -2
  193. package/src/src/ast/nodes/doc-tag.test.ts +2 -2
  194. package/src/src/ast/nodes/doc.test.ts +2 -2
  195. package/src/src/ast/nodes/enum-value.test.ts +2 -2
  196. package/src/src/ast/nodes/enum.test.ts +2 -2
  197. package/src/src/ast/nodes/function.test.ts +2 -2
  198. package/src/src/ast/nodes/generic-parameter.test.ts +2 -2
  199. package/src/src/ast/nodes/init-block.test.ts +2 -2
  200. package/src/src/ast/nodes/interface.test.ts +2 -2
  201. package/src/src/ast/nodes/object.test.ts +2 -2
  202. package/src/src/ast/nodes/parameter.test.ts +2 -2
  203. package/src/src/ast/nodes/property.test.ts +2 -2
  204. package/src/src/ast/nodes/reference.test.ts +2 -2
  205. package/src/src/ast/nodes/string.test.ts +2 -2
  206. package/src/src/generators/services/spring-controllers/spring-controller-generator.ts +5 -1
  207. package/src/src/import-collection.test.ts +2 -2
  208. package/src/tests/openapi-models.test.ts +2 -2
  209. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts +0 -28
  210. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts.map +0 -1
  211. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.js +0 -159
  212. package/esm/deps/jsr.io/@std/expect/1.0.6/_assertion.d.ts.map +0 -1
  213. package/esm/deps/jsr.io/@std/expect/1.0.6/_asymmetric_matchers.d.ts.map +0 -1
  214. package/esm/deps/jsr.io/@std/expect/1.0.6/_matchers.d.ts.map +0 -1
  215. package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts +0 -75
  216. package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts.map +0 -1
  217. package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.js +0 -101
  218. package/script/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts +0 -28
  219. package/script/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts.map +0 -1
  220. package/script/deps/jsr.io/@std/assert/1.0.6/object_match.js +0 -162
  221. package/script/deps/jsr.io/@std/expect/1.0.6/_assertion.d.ts.map +0 -1
  222. package/script/deps/jsr.io/@std/expect/1.0.6/_asymmetric_matchers.d.ts.map +0 -1
  223. package/script/deps/jsr.io/@std/expect/1.0.6/_matchers.d.ts.map +0 -1
  224. package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts +0 -75
  225. package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts.map +0 -1
  226. package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.js +0 -106
  227. package/src/deps/jsr.io/@std/assert/1.0.6/object_match.ts +0 -202
  228. package/src/deps/jsr.io/@std/internal/1.0.4/assertion_state.ts +0 -111
  229. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/assertion_error.d.ts +0 -0
  230. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/assertion_error.js +0 -0
  231. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equal.d.ts +0 -0
  232. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equal.js +0 -0
  233. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equals.d.ts +0 -0
  234. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/false.d.ts +0 -0
  235. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/false.js +0 -0
  236. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/instance_of.d.ts +0 -0
  237. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/instance_of.js +0 -0
  238. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/is_error.d.ts +0 -0
  239. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/match.d.ts +0 -0
  240. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/match.js +0 -0
  241. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_instance_of.d.ts +0 -0
  242. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_instance_of.js +0 -0
  243. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_match.d.ts +0 -0
  244. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_match.js +0 -0
  245. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_strict_equals.d.ts +0 -0
  246. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/rejects.d.ts +0 -0
  247. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/rejects.js +0 -0
  248. /package/esm/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/strict_equals.d.ts +0 -0
  249. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_equals.d.ts +0 -0
  250. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_not_equals.d.ts +0 -0
  251. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_build_message.d.ts +0 -0
  252. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_custom_equality_tester.d.ts +0 -0
  253. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_custom_equality_tester.js +0 -0
  254. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_equal.d.ts +0 -0
  255. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_extend.d.ts +0 -0
  256. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_extend.js +0 -0
  257. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_inspect_args.d.ts +0 -0
  258. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_inspect_args.js +0 -0
  259. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_matchers.d.ts +0 -0
  260. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_mock_util.d.ts +0 -0
  261. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_mock_util.js +0 -0
  262. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_types.d.ts +0 -0
  263. /package/esm/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_types.js +0 -0
  264. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts +0 -0
  265. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.js +0 -0
  266. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts +0 -0
  267. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.js +0 -0
  268. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts +0 -0
  269. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.js +0 -0
  270. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts +0 -0
  271. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.js +0 -0
  272. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts +0 -0
  273. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.js +0 -0
  274. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts +0 -0
  275. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.js +0 -0
  276. /package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/bdd.d.ts +0 -0
  277. /package/esm/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/mock.d.ts +0 -0
  278. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/assertion_error.d.ts +0 -0
  279. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/assertion_error.js +0 -0
  280. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equal.d.ts +0 -0
  281. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equal.js +0 -0
  282. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equals.d.ts +0 -0
  283. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/false.d.ts +0 -0
  284. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/false.js +0 -0
  285. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/instance_of.d.ts +0 -0
  286. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/instance_of.js +0 -0
  287. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/is_error.d.ts +0 -0
  288. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/match.d.ts +0 -0
  289. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/match.js +0 -0
  290. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_instance_of.d.ts +0 -0
  291. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_instance_of.js +0 -0
  292. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_match.d.ts +0 -0
  293. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_match.js +0 -0
  294. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_strict_equals.d.ts +0 -0
  295. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/rejects.d.ts +0 -0
  296. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/rejects.js +0 -0
  297. /package/script/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/strict_equals.d.ts +0 -0
  298. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_equals.d.ts +0 -0
  299. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_assert_not_equals.d.ts +0 -0
  300. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_build_message.d.ts +0 -0
  301. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_custom_equality_tester.d.ts +0 -0
  302. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_custom_equality_tester.js +0 -0
  303. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_equal.d.ts +0 -0
  304. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_extend.d.ts +0 -0
  305. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_extend.js +0 -0
  306. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_inspect_args.d.ts +0 -0
  307. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_inspect_args.js +0 -0
  308. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_matchers.d.ts +0 -0
  309. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_mock_util.d.ts +0 -0
  310. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_mock_util.js +0 -0
  311. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_types.d.ts +0 -0
  312. /package/script/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_types.js +0 -0
  313. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts +0 -0
  314. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.js +0 -0
  315. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts +0 -0
  316. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.js +0 -0
  317. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts +0 -0
  318. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.js +0 -0
  319. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts +0 -0
  320. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.js +0 -0
  321. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts +0 -0
  322. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.js +0 -0
  323. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts +0 -0
  324. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.js +0 -0
  325. /package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/bdd.d.ts +0 -0
  326. /package/script/deps/jsr.io/@std/testing/{1.0.3 → 1.0.4}/mock.d.ts +0 -0
  327. /package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/assertion_error.ts +0 -0
  328. /package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/equal.ts +0 -0
  329. /package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/false.ts +0 -0
  330. /package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/instance_of.ts +0 -0
  331. /package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/match.ts +0 -0
  332. /package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_instance_of.ts +0 -0
  333. /package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/not_match.ts +0 -0
  334. /package/src/deps/jsr.io/@std/assert/{1.0.6 → 1.0.7}/rejects.ts +0 -0
  335. /package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_custom_equality_tester.ts +0 -0
  336. /package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_extend.ts +0 -0
  337. /package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_inspect_args.ts +0 -0
  338. /package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_mock_util.ts +0 -0
  339. /package/src/deps/jsr.io/@std/expect/{1.0.6 → 1.0.7}/_types.ts +0 -0
  340. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.ts +0 -0
  341. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.ts +0 -0
  342. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.ts +0 -0
  343. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.ts +0 -0
  344. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.ts +0 -0
  345. /package/src/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
 
3
- import { getAssertionState } from "../../internal/1.0.4/assertion_state.js";
3
+ import { getAssertionState } from "../../internal/1.0.5/assertion_state.js";
4
4
 
5
5
  const assertionState = getAssertionState();
6
6
 
@@ -8,6 +8,11 @@ export function hasAssertions() {
8
8
  assertionState.setAssertionCheck(true);
9
9
  }
10
10
 
11
+ export function assertions(num: number) {
12
+ assertionState.setAssertionCount(num);
13
+ }
14
+
11
15
  export function emitAssertionTrigger() {
12
16
  assertionState.setAssertionTriggered(true);
17
+ assertionState.updateAssertionTriggerCount();
13
18
  }
@@ -6,6 +6,7 @@ import { equal } from "./_equal.js";
6
6
  export abstract class AsymmetricMatcher<T> {
7
7
  constructor(
8
8
  protected value: T,
9
+ protected inverse: boolean = false,
9
10
  ) {}
10
11
  abstract equals(other: unknown): boolean;
11
12
  }
@@ -69,12 +70,14 @@ export function any(c: unknown): Any {
69
70
  }
70
71
 
71
72
  export class ArrayContaining extends AsymmetricMatcher<any[]> {
72
- constructor(arr: any[]) {
73
- super(arr);
73
+ constructor(arr: any[], inverse = false) {
74
+ super(arr, inverse);
74
75
  }
75
76
 
76
77
  equals(other: any[]): boolean {
77
- return Array.isArray(other) && this.value.every((e) => other.includes(e));
78
+ const res = Array.isArray(other) &&
79
+ this.value.every((e) => other.includes(e));
80
+ return this.inverse ? !res : res;
78
81
  }
79
82
  }
80
83
 
@@ -82,6 +85,10 @@ export function arrayContaining(c: any[]): ArrayContaining {
82
85
  return new ArrayContaining(c);
83
86
  }
84
87
 
88
+ export function arrayNotContaining(c: any[]): ArrayContaining {
89
+ return new ArrayContaining(c, true);
90
+ }
91
+
85
92
  export class CloseTo extends AsymmetricMatcher<number> {
86
93
  readonly #precision: number;
87
94
 
@@ -113,16 +120,13 @@ export function closeTo(num: number, numDigits?: number): CloseTo {
113
120
  }
114
121
 
115
122
  export class StringContaining extends AsymmetricMatcher<string> {
116
- constructor(str: string) {
117
- super(str);
123
+ constructor(str: string, inverse = false) {
124
+ super(str, inverse);
118
125
  }
119
126
 
120
127
  equals(other: string): boolean {
121
- if (typeof other !== "string") {
122
- return false;
123
- }
124
-
125
- return other.includes(this.value);
128
+ const res = typeof other !== "string" ? false : other.includes(this.value);
129
+ return this.inverse ? !res : res;
126
130
  }
127
131
  }
128
132
 
@@ -130,17 +134,18 @@ export function stringContaining(str: string): StringContaining {
130
134
  return new StringContaining(str);
131
135
  }
132
136
 
137
+ export function stringNotContaining(str: string): StringContaining {
138
+ return new StringContaining(str, true);
139
+ }
140
+
133
141
  export class StringMatching extends AsymmetricMatcher<RegExp> {
134
- constructor(pattern: string | RegExp) {
135
- super(new RegExp(pattern));
142
+ constructor(pattern: string | RegExp, inverse = false) {
143
+ super(new RegExp(pattern), inverse);
136
144
  }
137
145
 
138
146
  equals(other: string): boolean {
139
- if (typeof other !== "string") {
140
- return false;
141
- }
142
-
143
- return this.value.test(other);
147
+ const res = typeof other !== "string" ? false : this.value.test(other);
148
+ return this.inverse ? !res : res;
144
149
  }
145
150
  }
146
151
 
@@ -148,25 +153,30 @@ export function stringMatching(pattern: string | RegExp): StringMatching {
148
153
  return new StringMatching(pattern);
149
154
  }
150
155
 
156
+ export function stringNotMatching(pattern: string | RegExp): StringMatching {
157
+ return new StringMatching(pattern, true);
158
+ }
159
+
151
160
  export class ObjectContaining
152
161
  extends AsymmetricMatcher<Record<string, unknown>> {
153
- constructor(obj: Record<string, unknown>) {
154
- super(obj);
162
+ constructor(obj: Record<string, unknown>, inverse = false) {
163
+ super(obj, inverse);
155
164
  }
156
165
 
157
166
  equals(other: Record<string, unknown>): boolean {
158
167
  const keys = Object.keys(this.value);
168
+ let res = true;
159
169
 
160
170
  for (const key of keys) {
161
171
  if (
162
172
  !Object.hasOwn(other, key) ||
163
173
  !equal(this.value[key], other[key])
164
174
  ) {
165
- return false;
175
+ res = false;
166
176
  }
167
177
  }
168
178
 
169
- return true;
179
+ return this.inverse ? !res : res;
170
180
  }
171
181
  }
172
182
 
@@ -175,3 +185,9 @@ export function objectContaining(
175
185
  ): ObjectContaining {
176
186
  return new ObjectContaining(obj);
177
187
  }
188
+
189
+ export function objectNotContaining(
190
+ obj: Record<string, unknown>,
191
+ ): ObjectContaining {
192
+ return new ObjectContaining(obj, true);
193
+ }
@@ -1,9 +1,9 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
 
3
- import { buildMessage } from "../../internal/1.0.4/build_message.js";
4
- import { diff } from "../../internal/1.0.4/diff.js";
5
- import { diffStr } from "../../internal/1.0.4/diff_str.js";
6
- import { format } from "../../internal/1.0.4/format.js";
3
+ import { buildMessage } from "../../internal/1.0.5/build_message.js";
4
+ import { diff } from "../../internal/1.0.5/diff.js";
5
+ import { diffStr } from "../../internal/1.0.5/diff_str.js";
6
+ import { format } from "../../internal/1.0.5/format.js";
7
7
  import type { EqualOptions } from "./_types.js";
8
8
 
9
9
  type EqualErrorMessageOptions = Pick<
@@ -44,6 +44,11 @@ export function equal(c: unknown, d: unknown, options?: EqualOptions): boolean {
44
44
  const seen = new Map();
45
45
 
46
46
  return (function compare(a: unknown, b: unknown): boolean {
47
+ const asymmetric = asymmetricEqual(a, b);
48
+ if (asymmetric !== undefined) {
49
+ return asymmetric;
50
+ }
51
+
47
52
  if (customTesters?.length) {
48
53
  for (const customTester of customTesters) {
49
54
  const testContext = {
@@ -67,11 +72,6 @@ export function equal(c: unknown, d: unknown, options?: EqualOptions): boolean {
67
72
  return String(a) === String(b);
68
73
  }
69
74
 
70
- const asymmetric = asymmetricEqual(a, b);
71
- if (asymmetric !== undefined) {
72
- return asymmetric;
73
- }
74
-
75
75
  if (a instanceof Date && b instanceof Date) {
76
76
  const aTime = a.getTime();
77
77
  const bTime = b.getTime();
@@ -119,6 +119,10 @@ export function equal(c: unknown, d: unknown, options?: EqualOptions): boolean {
119
119
  let aLen = aKeys.length;
120
120
  let bLen = bKeys.length;
121
121
 
122
+ if (strictCheck && aLen !== bLen) {
123
+ return false;
124
+ }
125
+
122
126
  if (!strictCheck) {
123
127
  if (aLen > 0) {
124
128
  for (let i = 0; i < aKeys.length; i += 1) {
@@ -145,9 +149,6 @@ export function equal(c: unknown, d: unknown, options?: EqualOptions): boolean {
145
149
  }
146
150
  }
147
151
 
148
- if (aLen !== bLen) {
149
- return false;
150
- }
151
152
  seen.set(a, b);
152
153
  if (isKeyedCollection(a) && isKeyedCollection(b)) {
153
154
  if (a.size !== b.size) {
@@ -1,23 +1,26 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
 
3
- import { assertNotStrictEquals } from "../../assert/1.0.6/not_strict_equals.js";
4
- import { assertStrictEquals } from "../../assert/1.0.6/strict_equals.js";
5
- import { assertInstanceOf } from "../../assert/1.0.6/instance_of.js";
6
- import { assertIsError } from "../../assert/1.0.6/is_error.js";
7
- import { assertNotInstanceOf } from "../../assert/1.0.6/not_instance_of.js";
8
- import { assertMatch } from "../../assert/1.0.6/match.js";
9
- import { assertObjectMatch } from "../../assert/1.0.6/object_match.js";
10
- import { assertNotMatch } from "../../assert/1.0.6/not_match.js";
11
- import { AssertionError } from "../../assert/1.0.6/assertion_error.js";
3
+ import { assertNotStrictEquals } from "../../assert/1.0.7/not_strict_equals.js";
4
+ import { assertStrictEquals } from "../../assert/1.0.7/strict_equals.js";
5
+ import { assertInstanceOf } from "../../assert/1.0.7/instance_of.js";
6
+ import { assertIsError } from "../../assert/1.0.7/is_error.js";
7
+ import { assertNotInstanceOf } from "../../assert/1.0.7/not_instance_of.js";
8
+ import { assertMatch } from "../../assert/1.0.7/match.js";
9
+ import { assertNotMatch } from "../../assert/1.0.7/not_match.js";
10
+ import { AssertionError } from "../../assert/1.0.7/assertion_error.js";
12
11
 
13
12
  import { assertEquals } from "./_assert_equals.js";
14
13
  import { assertNotEquals } from "./_assert_not_equals.js";
15
14
  import { equal } from "./_equal.js";
16
- import { format } from "../../internal/1.0.4/format.js";
15
+ import { format } from "../../internal/1.0.5/format.js";
17
16
  import type { AnyConstructor, MatcherContext, MatchResult } from "./_types.js";
18
17
  import { getMockCalls } from "./_mock_util.js";
19
18
  import { inspectArg, inspectArgs } from "./_inspect_args.js";
20
- import { buildEqualOptions, iterableEquality } from "./_utils.js";
19
+ import {
20
+ buildEqualOptions,
21
+ iterableEquality,
22
+ subsetEquality,
23
+ } from "./_utils.js";
21
24
 
22
25
  export function toBe(context: MatcherContext, expect: unknown): MatchResult {
23
26
  if (context.isNot) {
@@ -462,34 +465,35 @@ export function toMatchObject(
462
465
  context: MatcherContext,
463
466
  expected: Record<PropertyKey, unknown> | Record<PropertyKey, unknown>[],
464
467
  ): MatchResult {
465
- if (context.isNot) {
466
- let objectMatch = false;
467
- try {
468
- assertObjectMatch(
469
- // deno-lint-ignore no-explicit-any
470
- context.value as Record<PropertyKey, any>,
471
- expected as Record<PropertyKey, unknown>,
472
- context.customMessage,
473
- );
474
- objectMatch = true;
475
- const actualString = format(context.value);
476
- const expectedString = format(expected);
477
- throw new AssertionError(
478
- `Expected ${actualString} to NOT match ${expectedString}`,
479
- );
480
- } catch (e) {
481
- if (objectMatch) {
482
- throw e;
483
- }
484
- return;
485
- }
486
- } else {
487
- assertObjectMatch(
488
- // deno-lint-ignore no-explicit-any
489
- context.value as Record<PropertyKey, any>,
490
- expected as Record<PropertyKey, unknown>,
491
- context.customMessage,
468
+ const received = context.value;
469
+
470
+ if (typeof received !== "object" || received === null) {
471
+ throw new AssertionError("Received value must be an object");
472
+ }
473
+
474
+ if (typeof expected !== "object" || expected === null) {
475
+ throw new AssertionError("Received value must be an object");
476
+ }
477
+
478
+ const pass = equal(context.value, expected, {
479
+ strictCheck: false,
480
+ customTesters: [
481
+ ...context.customTesters,
482
+ iterableEquality,
483
+ subsetEquality,
484
+ ],
485
+ });
486
+
487
+ const triggerError = () => {
488
+ const actualString = format(context.value);
489
+ const expectedString = format(expected);
490
+ throw new AssertionError(
491
+ `Expected ${actualString} to NOT match ${expectedString}`,
492
492
  );
493
+ };
494
+
495
+ if (context.isNot && pass || !context.isNot && !pass) {
496
+ triggerError();
493
497
  }
494
498
  }
495
499
 
@@ -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
+ }
@@ -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.7/assertion_error.js";
17
+ import {
18
+ assertions,
19
+ emitAssertionTrigger,
20
+ hasAssertions,
21
+ } from "./_assertions.js";
18
22
  import {
19
23
  addCustomEqualityTesters,
20
24
  getCustomEqualityTesters,
@@ -491,6 +495,7 @@ expect.stringContaining = asymmetricMatchers.stringContaining as (
491
495
  expect.stringMatching = asymmetricMatchers.stringMatching as (
492
496
  pattern: string | RegExp,
493
497
  ) => ReturnType<typeof asymmetricMatchers.stringMatching>;
498
+
494
499
  /**
495
500
  * `expect.hasAssertions` verifies that at least one assertion is called during a test.
496
501
  *
@@ -509,6 +514,26 @@ expect.stringMatching = asymmetricMatchers.stringMatching as (
509
514
  * ```
510
515
  */
511
516
  expect.hasAssertions = hasAssertions as () => void;
517
+
518
+ /**
519
+ * `expect.assertions` verifies that a certain number of assertions are called during a test.
520
+ *
521
+ * Note: expect.assertions only can use in bdd function test suite, such as `test` or `it`.
522
+ *
523
+ * @example
524
+ * ```ts
525
+ *
526
+ * import { test } from "@std/testing/bdd";
527
+ * import { expect } from "@std/expect";
528
+ *
529
+ * test("it works", () => {
530
+ * expect.assertions(1);
531
+ * expect("a").not.toBe("b");
532
+ * });
533
+ * ```
534
+ */
535
+ expect.assertions = assertions as (num: number) => void;
536
+
512
537
  /**
513
538
  * `expect.objectContaining(object)` matches any received object that recursively matches the expected properties.
514
539
  * That is, the expected object is not a subset of the received object. Therefore, it matches a received object
@@ -527,3 +552,50 @@ expect.hasAssertions = hasAssertions as () => void;
527
552
  expect.objectContaining = asymmetricMatchers.objectContaining as (
528
553
  obj: Record<string, unknown>,
529
554
  ) => ReturnType<typeof asymmetricMatchers.objectContaining>;
555
+ /**
556
+ * `expect.not.arrayContaining` matches a received array which does not contain
557
+ * all of the elements in the expected array. That is, the expected array is not
558
+ * a subset of the received array.
559
+ *
560
+ * `expect.not.objectContaining` matches any received object that does not recursively
561
+ * match the expected properties. That is, the expected object is not a subset of the
562
+ * received object. Therefore, it matches a received object which contains properties
563
+ * that are not in the expected object.
564
+ *
565
+ * `expect.not.stringContaining` matches the received value if it is not a string
566
+ * or if it is a string that does not contain the exact expected string.
567
+ *
568
+ * `expect.not.stringMatching` matches the received value if it is not a string
569
+ * or if it is a string that does not match the expected string or regular expression.
570
+ *
571
+ * @example
572
+ * ```ts
573
+ * import { expect } from "@std/expect";
574
+ *
575
+ * Deno.test("expect.not.arrayContaining", () => {
576
+ * const expected = ["Samantha"];
577
+ * expect(["Alice", "Bob", "Eve"]).toEqual(expect.not.arrayContaining(expected));
578
+ * });
579
+ *
580
+ * Deno.test("expect.not.objectContaining", () => {
581
+ * const expected = { foo: "bar" };
582
+ * expect({ bar: "baz" }).toEqual(expect.not.objectContaining(expected));
583
+ * });
584
+ *
585
+ * Deno.test("expect.not.stringContaining", () => {
586
+ * const expected = "Hello world!";
587
+ * expect("How are you?").toEqual(expect.not.stringContaining(expected));
588
+ * });
589
+ *
590
+ * Deno.test("expect.not.stringMatching", () => {
591
+ * const expected = /Hello world!/;
592
+ * expect("How are you?").toEqual(expect.not.stringMatching(expected));
593
+ * });
594
+ * ```
595
+ */
596
+ expect.not = {
597
+ arrayContaining: asymmetricMatchers.arrayNotContaining,
598
+ objectContaining: asymmetricMatchers.objectNotContaining,
599
+ stringContaining: asymmetricMatchers.stringNotContaining,
600
+ stringMatching: asymmetricMatchers.stringNotMatching,
601
+ };