hein 1.4.2 → 2.0.0-alpha.0

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 (303) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/ESM_MIGRATION_NOTES.md +6 -0
  3. package/README.md +46 -7
  4. package/dist/assert-9EsvfQwn.d.cts +483 -0
  5. package/dist/assert-9EsvfQwn.d.cts.map +1 -0
  6. package/dist/assert-B_vcZS90.d.ts +481 -0
  7. package/dist/assert-B_vcZS90.d.ts.map +1 -0
  8. package/dist/assert-DZjgWjOw.cjs +1626 -0
  9. package/dist/assert-DZjgWjOw.cjs.map +1 -0
  10. package/dist/assert-kFXp7i_B.js +1260 -0
  11. package/dist/assert-kFXp7i_B.js.map +1 -0
  12. package/dist/assert.cjs +53 -0
  13. package/dist/assert.d.cts +3 -0
  14. package/dist/assert.d.ts +3 -27
  15. package/dist/assert.js +3 -84
  16. package/dist/chunk-CTAAG5j7.js +13 -0
  17. package/dist/expect.types-DPl6xY56.d.ts +99 -0
  18. package/dist/expect.types-DPl6xY56.d.ts.map +1 -0
  19. package/dist/expect.types-s8icgWp5.d.cts +99 -0
  20. package/dist/expect.types-s8icgWp5.d.cts.map +1 -0
  21. package/dist/expect.types.cjs +0 -0
  22. package/dist/expect.types.d.cts +3 -0
  23. package/dist/expect.types.d.ts +3 -66
  24. package/dist/expect.types.js +1 -4
  25. package/dist/index.cjs +596 -0
  26. package/dist/index.cjs.map +1 -0
  27. package/dist/index.d.cts +16 -0
  28. package/dist/index.d.cts.map +1 -0
  29. package/dist/index.d.ts +15 -8
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +573 -27
  32. package/dist/index.js.map +1 -1
  33. package/dist/throws-BrCCeBBl.d.ts +42 -0
  34. package/dist/throws-BrCCeBBl.d.ts.map +1 -0
  35. package/dist/throws-D7JsW4NM.d.cts +40 -0
  36. package/dist/throws-D7JsW4NM.d.cts.map +1 -0
  37. package/eslint.config.mjs +13 -0
  38. package/package.json +31 -18
  39. package/tsdown.config.ts +9 -0
  40. package/dist/assert/deep-equal.d.ts +0 -2
  41. package/dist/assert/deep-equal.d.ts.map +0 -1
  42. package/dist/assert/deep-equal.js +0 -26
  43. package/dist/assert/deep-equal.js.map +0 -1
  44. package/dist/assert/deep-has-property.d.ts +0 -20
  45. package/dist/assert/deep-has-property.d.ts.map +0 -1
  46. package/dist/assert/deep-has-property.js +0 -50
  47. package/dist/assert/deep-has-property.js.map +0 -1
  48. package/dist/assert/ends-with.d.ts +0 -11
  49. package/dist/assert/ends-with.d.ts.map +0 -1
  50. package/dist/assert/ends-with.js +0 -30
  51. package/dist/assert/ends-with.js.map +0 -1
  52. package/dist/assert/equal.d.ts +0 -9
  53. package/dist/assert/equal.d.ts.map +0 -1
  54. package/dist/assert/equal.js +0 -21
  55. package/dist/assert/equal.js.map +0 -1
  56. package/dist/assert/greater-than-equal.d.ts +0 -9
  57. package/dist/assert/greater-than-equal.d.ts.map +0 -1
  58. package/dist/assert/greater-than-equal.js +0 -20
  59. package/dist/assert/greater-than-equal.js.map +0 -1
  60. package/dist/assert/greater-than.d.ts +0 -9
  61. package/dist/assert/greater-than.d.ts.map +0 -1
  62. package/dist/assert/greater-than.js +0 -20
  63. package/dist/assert/greater-than.js.map +0 -1
  64. package/dist/assert/has-keys.d.ts +0 -14
  65. package/dist/assert/has-keys.d.ts.map +0 -1
  66. package/dist/assert/has-keys.js +0 -47
  67. package/dist/assert/has-keys.js.map +0 -1
  68. package/dist/assert/has-members.d.ts +0 -46
  69. package/dist/assert/has-members.d.ts.map +0 -1
  70. package/dist/assert/has-members.js +0 -58
  71. package/dist/assert/has-members.js.map +0 -1
  72. package/dist/assert/has-property.d.ts +0 -20
  73. package/dist/assert/has-property.d.ts.map +0 -1
  74. package/dist/assert/has-property.js +0 -47
  75. package/dist/assert/has-property.js.map +0 -1
  76. package/dist/assert/has-size.d.ts +0 -40
  77. package/dist/assert/has-size.d.ts.map +0 -1
  78. package/dist/assert/has-size.js +0 -68
  79. package/dist/assert/has-size.js.map +0 -1
  80. package/dist/assert/in-ballpark.d.ts +0 -14
  81. package/dist/assert/in-ballpark.d.ts.map +0 -1
  82. package/dist/assert/in-ballpark.js +0 -26
  83. package/dist/assert/in-ballpark.js.map +0 -1
  84. package/dist/assert/includes.d.ts +0 -22
  85. package/dist/assert/includes.d.ts.map +0 -1
  86. package/dist/assert/includes.js +0 -32
  87. package/dist/assert/includes.js.map +0 -1
  88. package/dist/assert/instance-of.d.ts +0 -13
  89. package/dist/assert/instance-of.d.ts.map +0 -1
  90. package/dist/assert/instance-of.js +0 -35
  91. package/dist/assert/instance-of.js.map +0 -1
  92. package/dist/assert/is-after.d.ts +0 -9
  93. package/dist/assert/is-after.d.ts.map +0 -1
  94. package/dist/assert/is-after.js +0 -27
  95. package/dist/assert/is-after.js.map +0 -1
  96. package/dist/assert/is-before.d.ts +0 -9
  97. package/dist/assert/is-before.d.ts.map +0 -1
  98. package/dist/assert/is-before.js +0 -27
  99. package/dist/assert/is-before.js.map +0 -1
  100. package/dist/assert/is-between.d.ts +0 -13
  101. package/dist/assert/is-between.d.ts.map +0 -1
  102. package/dist/assert/is-between.js +0 -38
  103. package/dist/assert/is-between.js.map +0 -1
  104. package/dist/assert/is-empty.d.ts +0 -29
  105. package/dist/assert/is-empty.d.ts.map +0 -1
  106. package/dist/assert/is-empty.js +0 -48
  107. package/dist/assert/is-empty.js.map +0 -1
  108. package/dist/assert/is-type.d.ts +0 -94
  109. package/dist/assert/is-type.d.ts.map +0 -1
  110. package/dist/assert/is-type.js +0 -32
  111. package/dist/assert/is-type.js.map +0 -1
  112. package/dist/assert/less-than-equal.d.ts +0 -9
  113. package/dist/assert/less-than-equal.d.ts.map +0 -1
  114. package/dist/assert/less-than-equal.js +0 -27
  115. package/dist/assert/less-than-equal.js.map +0 -1
  116. package/dist/assert/less-than.d.ts +0 -9
  117. package/dist/assert/less-than.d.ts.map +0 -1
  118. package/dist/assert/less-than.js +0 -20
  119. package/dist/assert/less-than.js.map +0 -1
  120. package/dist/assert/match.d.ts +0 -13
  121. package/dist/assert/match.d.ts.map +0 -1
  122. package/dist/assert/match.js +0 -29
  123. package/dist/assert/match.js.map +0 -1
  124. package/dist/assert/rejects.d.ts +0 -33
  125. package/dist/assert/rejects.d.ts.map +0 -1
  126. package/dist/assert/rejects.js +0 -48
  127. package/dist/assert/rejects.js.map +0 -1
  128. package/dist/assert/round-to.d.ts +0 -13
  129. package/dist/assert/round-to.d.ts.map +0 -1
  130. package/dist/assert/round-to.js +0 -43
  131. package/dist/assert/round-to.js.map +0 -1
  132. package/dist/assert/starts-with.d.ts +0 -12
  133. package/dist/assert/starts-with.d.ts.map +0 -1
  134. package/dist/assert/starts-with.js +0 -30
  135. package/dist/assert/starts-with.js.map +0 -1
  136. package/dist/assert/throws.d.ts +0 -33
  137. package/dist/assert/throws.d.ts.map +0 -1
  138. package/dist/assert/throws.js +0 -40
  139. package/dist/assert/throws.js.map +0 -1
  140. package/dist/assert.d.ts.map +0 -1
  141. package/dist/assert.js.map +0 -1
  142. package/dist/expect/after.d.ts +0 -11
  143. package/dist/expect/after.d.ts.map +0 -1
  144. package/dist/expect/after.js +0 -18
  145. package/dist/expect/after.js.map +0 -1
  146. package/dist/expect/ballpark.d.ts +0 -12
  147. package/dist/expect/ballpark.d.ts.map +0 -1
  148. package/dist/expect/ballpark.js +0 -18
  149. package/dist/expect/ballpark.js.map +0 -1
  150. package/dist/expect/before.d.ts +0 -11
  151. package/dist/expect/before.d.ts.map +0 -1
  152. package/dist/expect/before.js +0 -18
  153. package/dist/expect/before.js.map +0 -1
  154. package/dist/expect/between.d.ts +0 -21
  155. package/dist/expect/between.d.ts.map +0 -1
  156. package/dist/expect/between.js +0 -18
  157. package/dist/expect/between.js.map +0 -1
  158. package/dist/expect/empty.d.ts +0 -16
  159. package/dist/expect/empty.d.ts.map +0 -1
  160. package/dist/expect/empty.js +0 -18
  161. package/dist/expect/empty.js.map +0 -1
  162. package/dist/expect/end-with.d.ts +0 -12
  163. package/dist/expect/end-with.d.ts.map +0 -1
  164. package/dist/expect/end-with.js +0 -18
  165. package/dist/expect/end-with.js.map +0 -1
  166. package/dist/expect/eql.d.ts +0 -11
  167. package/dist/expect/eql.d.ts.map +0 -1
  168. package/dist/expect/eql.js +0 -22
  169. package/dist/expect/eql.js.map +0 -1
  170. package/dist/expect/equal-shorthand.d.ts +0 -14
  171. package/dist/expect/equal-shorthand.d.ts.map +0 -1
  172. package/dist/expect/equal-shorthand.js +0 -34
  173. package/dist/expect/equal-shorthand.js.map +0 -1
  174. package/dist/expect/equal.d.ts +0 -14
  175. package/dist/expect/equal.d.ts.map +0 -1
  176. package/dist/expect/equal.js +0 -28
  177. package/dist/expect/equal.js.map +0 -1
  178. package/dist/expect/excluding.d.ts +0 -11
  179. package/dist/expect/excluding.d.ts.map +0 -1
  180. package/dist/expect/excluding.js +0 -14
  181. package/dist/expect/excluding.js.map +0 -1
  182. package/dist/expect/greater-than-equal.d.ts +0 -32
  183. package/dist/expect/greater-than-equal.d.ts.map +0 -1
  184. package/dist/expect/greater-than-equal.js +0 -20
  185. package/dist/expect/greater-than-equal.js.map +0 -1
  186. package/dist/expect/greater-than.d.ts +0 -32
  187. package/dist/expect/greater-than.d.ts.map +0 -1
  188. package/dist/expect/greater-than.js +0 -20
  189. package/dist/expect/greater-than.js.map +0 -1
  190. package/dist/expect/has-property.d.ts +0 -36
  191. package/dist/expect/has-property.d.ts.map +0 -1
  192. package/dist/expect/has-property.js +0 -22
  193. package/dist/expect/has-property.js.map +0 -1
  194. package/dist/expect/include.d.ts +0 -25
  195. package/dist/expect/include.d.ts.map +0 -1
  196. package/dist/expect/include.js +0 -22
  197. package/dist/expect/include.js.map +0 -1
  198. package/dist/expect/instance-of-shorthand.d.ts +0 -34
  199. package/dist/expect/instance-of-shorthand.d.ts.map +0 -1
  200. package/dist/expect/instance-of-shorthand.js +0 -22
  201. package/dist/expect/instance-of-shorthand.js.map +0 -1
  202. package/dist/expect/instance-of.d.ts +0 -11
  203. package/dist/expect/instance-of.d.ts.map +0 -1
  204. package/dist/expect/instance-of.js +0 -18
  205. package/dist/expect/instance-of.js.map +0 -1
  206. package/dist/expect/keys.d.ts +0 -17
  207. package/dist/expect/keys.d.ts.map +0 -1
  208. package/dist/expect/keys.js +0 -18
  209. package/dist/expect/keys.js.map +0 -1
  210. package/dist/expect/length.d.ts +0 -28
  211. package/dist/expect/length.d.ts.map +0 -1
  212. package/dist/expect/length.js +0 -19
  213. package/dist/expect/length.js.map +0 -1
  214. package/dist/expect/less-than-equal.d.ts +0 -32
  215. package/dist/expect/less-than-equal.d.ts.map +0 -1
  216. package/dist/expect/less-than-equal.js +0 -20
  217. package/dist/expect/less-than-equal.js.map +0 -1
  218. package/dist/expect/less-than.d.ts +0 -32
  219. package/dist/expect/less-than.d.ts.map +0 -1
  220. package/dist/expect/less-than.js +0 -20
  221. package/dist/expect/less-than.js.map +0 -1
  222. package/dist/expect/match.d.ts +0 -10
  223. package/dist/expect/match.d.ts.map +0 -1
  224. package/dist/expect/match.js +0 -18
  225. package/dist/expect/match.js.map +0 -1
  226. package/dist/expect/members.d.ts +0 -20
  227. package/dist/expect/members.d.ts.map +0 -1
  228. package/dist/expect/members.js +0 -32
  229. package/dist/expect/members.js.map +0 -1
  230. package/dist/expect/reject.d.ts +0 -12
  231. package/dist/expect/reject.d.ts.map +0 -1
  232. package/dist/expect/reject.js +0 -13
  233. package/dist/expect/reject.js.map +0 -1
  234. package/dist/expect/round-to.d.ts +0 -12
  235. package/dist/expect/round-to.d.ts.map +0 -1
  236. package/dist/expect/round-to.js +0 -18
  237. package/dist/expect/round-to.js.map +0 -1
  238. package/dist/expect/start-with.d.ts +0 -12
  239. package/dist/expect/start-with.d.ts.map +0 -1
  240. package/dist/expect/start-with.js +0 -18
  241. package/dist/expect/start-with.js.map +0 -1
  242. package/dist/expect/throw.d.ts +0 -12
  243. package/dist/expect/throw.d.ts.map +0 -1
  244. package/dist/expect/throw.js +0 -13
  245. package/dist/expect/throw.js.map +0 -1
  246. package/dist/expect/type-shorthand.d.ts +0 -66
  247. package/dist/expect/type-shorthand.d.ts.map +0 -1
  248. package/dist/expect/type-shorthand.js +0 -34
  249. package/dist/expect/type-shorthand.js.map +0 -1
  250. package/dist/expect/type.d.ts +0 -10
  251. package/dist/expect/type.d.ts.map +0 -1
  252. package/dist/expect/type.js +0 -18
  253. package/dist/expect/type.js.map +0 -1
  254. package/dist/expect.d.ts +0 -33
  255. package/dist/expect.d.ts.map +0 -1
  256. package/dist/expect.js +0 -88
  257. package/dist/expect.js.map +0 -1
  258. package/dist/expect.types.d.ts.map +0 -1
  259. package/dist/expect.types.js.map +0 -1
  260. package/dist/mixins.d.ts +0 -26
  261. package/dist/mixins.d.ts.map +0 -1
  262. package/dist/mixins.js +0 -9
  263. package/dist/mixins.js.map +0 -1
  264. package/dist/utils/cast-array.d.ts +0 -2
  265. package/dist/utils/cast-array.d.ts.map +0 -1
  266. package/dist/utils/cast-array.js +0 -14
  267. package/dist/utils/cast-array.js.map +0 -1
  268. package/dist/utils/chain.d.ts +0 -3
  269. package/dist/utils/chain.d.ts.map +0 -1
  270. package/dist/utils/chain.js +0 -21
  271. package/dist/utils/chain.js.map +0 -1
  272. package/dist/utils/fail.d.ts +0 -6
  273. package/dist/utils/fail.d.ts.map +0 -1
  274. package/dist/utils/fail.js +0 -13
  275. package/dist/utils/fail.js.map +0 -1
  276. package/dist/utils/get-size.d.ts +0 -2
  277. package/dist/utils/get-size.d.ts.map +0 -1
  278. package/dist/utils/get-size.js +0 -24
  279. package/dist/utils/get-size.js.map +0 -1
  280. package/dist/utils/get-type.d.ts +0 -3
  281. package/dist/utils/get-type.d.ts.map +0 -1
  282. package/dist/utils/get-type.js +0 -17
  283. package/dist/utils/get-type.js.map +0 -1
  284. package/dist/utils/match.d.ts +0 -15
  285. package/dist/utils/match.d.ts.map +0 -1
  286. package/dist/utils/match.js +0 -150
  287. package/dist/utils/match.js.map +0 -1
  288. package/dist/utils/process-error.d.ts +0 -11
  289. package/dist/utils/process-error.d.ts.map +0 -1
  290. package/dist/utils/process-error.js +0 -98
  291. package/dist/utils/process-error.js.map +0 -1
  292. package/dist/utils/types.d.ts +0 -4
  293. package/dist/utils/types.d.ts.map +0 -1
  294. package/dist/utils/types.js +0 -3
  295. package/dist/utils/types.js.map +0 -1
  296. package/dist/utils/validate-numeric-and-dates.d.ts +0 -2
  297. package/dist/utils/validate-numeric-and-dates.d.ts.map +0 -1
  298. package/dist/utils/validate-numeric-and-dates.js +0 -15
  299. package/dist/utils/validate-numeric-and-dates.js.map +0 -1
  300. package/dist/utils/xor.d.ts +0 -2
  301. package/dist/utils/xor.d.ts.map +0 -1
  302. package/dist/utils/xor.js +0 -8
  303. package/dist/utils/xor.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert-DZjgWjOw.cjs","names":["evaluationSymbol: unique symbol","match","match","allowedTypes: (ValueType | 'date')[]","AssertionError","AssertionError","AssertionError","match"],"sources":["../src/utils/xor.ts","../src/utils/match.ts","../src/assert/deep-equal.ts","../src/assert/equal.ts","../src/utils/get-type.ts","../src/utils/validate-numeric-and-dates.ts","../src/assert/greater-than.ts","../src/assert/greater-than-equal.ts","../src/assert/has-property.ts","../src/assert/has-size.ts","../src/assert/includes.ts","../src/assert/instance-of.ts","../src/assert/is-empty.ts","../src/assert/is-type.ts","../src/assert/less-than.ts","../src/assert/less-than-equal.ts","../src/assert/match.ts","../src/utils/process-error.ts","../src/assert/rejects.ts","../src/assert/throws.ts","../src/assert/deep-has-property.ts","../src/assert/starts-with.ts","../src/assert/ends-with.ts","../src/assert/is-before.ts","../src/assert/is-after.ts","../src/assert/is-between.ts","../src/assert/in-ballpark.ts","../src/assert/round-to.ts","../src/assert/has-members.ts","../src/assert/has-keys.ts","../src/assert.ts"],"sourcesContent":["export const xor = (a: boolean, b: boolean) => {\n return (a && !b) || (!a && b);\n};\n","import isObjectLike from 'lodash/isObjectLike.js';\nimport { xor } from './xor.js';\n\nconst evaluationSymbol: unique symbol = Symbol();\n\ninterface Evaluation {\n [evaluationSymbol]: true;\n (value: any): boolean;\n}\n\nexport const createEvaluation = (callback: (value: any) => boolean): any => {\n const evaluation = (value: any): boolean => {\n return callback(value);\n };\n evaluation[evaluationSymbol] = true;\n return evaluation as Evaluation;\n};\n\nexport const any = createEvaluation(() => true);\n\nexport const isEvaluation = (value: any): value is Evaluation => value && value[evaluationSymbol];\n\ninterface MatchOptions {\n mutate?: boolean;\n partial?: boolean;\n}\n\nexport const match = <T>(actual: T, expected: T, { mutate = false, partial = false }: MatchOptions = {}): boolean => {\n if (actual === expected) {\n return true;\n }\n if (isEvaluation(expected)) {\n return expected(actual);\n }\n\n if (actual == null || expected == null || (!isObjectLike(actual) && !isObjectLike(expected))) {\n return actual !== actual && expected !== expected;\n }\n let result = true;\n if (actual instanceof Map || expected instanceof Map) {\n if (!(actual instanceof Map && expected instanceof Map)) {\n return false;\n }\n if (actual.size !== expected.size && !partial) {\n result = false;\n }\n for (const [key, value] of expected.entries()) {\n if (!actual.has(key)) {\n result = false;\n continue;\n }\n const actualValue = actual.get(key);\n if (mutate && isEvaluation(value)) {\n expected.set(key, actualValue);\n result &&= value(actualValue);\n continue;\n }\n result = match(actualValue, value, { mutate, partial }) && result;\n continue;\n }\n return result;\n }\n if (actual instanceof WeakMap || expected instanceof WeakMap) {\n return false;\n }\n if (actual instanceof Set || expected instanceof Set) {\n if (!(actual instanceof Set && expected instanceof Set)) {\n return false;\n }\n if (actual.size !== expected.size && !partial) {\n return false;\n }\n return [...expected.values()].every((value) => {\n return actual.has(value);\n });\n }\n if (actual instanceof WeakSet || expected instanceof WeakSet) {\n return false;\n }\n if (actual instanceof Date || expected instanceof Date) {\n if (!(actual instanceof Date && expected instanceof Date)) {\n const date1 = new Date(actual as any);\n const date2 = new Date(expected as any);\n return date1.getTime() === date2.getTime();\n }\n if (actual.getTime() !== expected.getTime()) {\n return false;\n }\n return true;\n }\n if (xor(isObjectLike(actual), isObjectLike(expected))) {\n return false;\n }\n if (Array.isArray(actual) || Array.isArray(expected)) {\n if (!(Array.isArray(actual) && Array.isArray(expected))) {\n return false;\n }\n if (actual.length !== expected.length && !partial) {\n result = false;\n }\n if (partial && actual.length < expected.length) {\n result = false;\n }\n for (const [index, value] of actual.entries()) {\n if (index >= expected.length) {\n continue;\n }\n const expectedValue = expected[index];\n if (mutate && isEvaluation(expectedValue)) {\n const matchesEvaluation = expectedValue(value);\n if (matchesEvaluation) {\n expected[index] = value;\n }\n result &&= matchesEvaluation;\n continue;\n }\n result &&= match(value, expectedValue, { mutate, partial });\n continue;\n }\n return result;\n }\n if (Object.keys(actual).length !== Object.keys(expected).length && !partial) {\n result = false;\n }\n if (globalThis.Buffer && actual instanceof globalThis.Buffer && expected instanceof globalThis.Buffer) {\n return Buffer.compare(actual, expected) === 0;\n }\n for (const key in expected) {\n if (!(key in (actual as object))) {\n result &&= false;\n continue;\n }\n }\n for (const index in actual) {\n const expectedValue = expected[index];\n const actualValue = actual[index];\n if (!(index in (expected as object))) {\n if (partial) {\n continue;\n }\n result &&= false;\n continue;\n }\n if (isEvaluation(expectedValue)) {\n if (!expectedValue(actualValue)) {\n result &&= false;\n continue;\n }\n if (mutate) {\n expected[index] = actualValue;\n }\n continue;\n }\n if (!match(actual[index], expectedValue, { mutate, partial })) {\n result = false;\n }\n }\n return result;\n};\n","import cloneDeep from 'lodash/cloneDeep.js';\nimport { createAssertion } from 'hein-assertion-utils';\nimport { match } from '../utils/match.js';\n\nexport const [deepEqual, notDeepEqual] = createAssertion({\n messages: {\n notEql: 'Expected {{= it.actual }} to deep equal {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not deep equal {{= it.expected }}'\n },\n test:\n (report) =>\n <T>(actual: T, expected: T, partialOrMessage: string | boolean = false, message?: string) => {\n const partial = typeof partialOrMessage === 'boolean' ? partialOrMessage : false;\n message = typeof partialOrMessage === 'string' ? partialOrMessage : message;\n if (typeof expected !== 'function') {\n // TODO: evaluations\n expected = cloneDeep(expected);\n }\n if (match(actual, expected, { mutate: true, partial })) {\n return report({ message, status: 'ok', expected, actual });\n }\n return report({ message, status: 'notok', messageId: 'notEql', expected, actual });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\n\ninterface Equal {\n /**\n * check for === equality except here NaN is equal to NaN\n */\n <T>(actual: T, expected: T, message?: string): void;\n}\n\nexport const [equal, notEqual] = createAssertion({\n messages: {\n equal: 'Expected {{= it.actual }} to equal {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not equal {{= it.expected }}'\n },\n test:\n (report): Equal =>\n <T>(a: T, b: T, message?: string) => {\n if (Number.isNaN(a) && Number.isNaN(b)) {\n return report({ status: 'ok', expected: b, actual: a, message });\n }\n if (a !== b) {\n return report({ status: 'notok', messageId: 'equal', actual: a, expected: b, message });\n }\n return report({ status: 'ok', expected: a, actual: b, message });\n }\n});\n","export type ValueType =\n | 'string'\n | 'number'\n | 'bigint'\n | 'boolean'\n | 'symbol'\n | 'undefined'\n | 'object'\n | 'function'\n | 'null'\n | 'NaN'\n | 'array';\n\nexport const getType = (value: any): ValueType => {\n if (value !== value) {\n return 'NaN';\n }\n if (Array.isArray(value)) {\n return 'array';\n }\n if (value === null) {\n return 'null';\n }\n return typeof value;\n};\n","import { AssertionError } from 'hein-assertion-utils';\nimport { type ValueType, getType } from './get-type.js';\n\nconst allowedTypes: (ValueType | 'date')[] = ['number', 'bigint', 'date'];\n\nexport const validateNumericsAndDates = (actual: any, expected: any) => {\n const actualType = actual instanceof Date ? 'date' : getType(actual);\n const expectedType = expected instanceof Date ? 'date' : getType(expected);\n if (!allowedTypes.includes(actualType) || !allowedTypes.includes(expectedType)) {\n throw new AssertionError(\n actualType,\n expectedType,\n `Expected arguments to be ${ allowedTypes.join('/') }, received ${ actualType }/${ expectedType }`\n );\n }\n};\n","import { createAssertion } from 'hein-assertion-utils';\nimport { validateNumericsAndDates } from '../utils/validate-numeric-and-dates.js';\n\ninterface GreaterThan {\n /**\n * check for >\n */\n <T extends number | bigint | Date>(actual: T, expected: T, message?: string): void;\n}\n\nexport const [greaterThan, notGreaterThan] = createAssertion({\n messages: {\n smaller: 'Expected {{= it.actual }} to be greater than {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not be greater than {{= it.expected }}'\n },\n test:\n (report): GreaterThan =>\n (actual: any, expected: any) => {\n validateNumericsAndDates(actual, expected);\n if (actual > expected) {\n return report({ status: 'ok', messageId: 'not', expected, actual });\n }\n return report({ status: 'notok', messageId: 'smaller', actual, expected, noStringify: true });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\nimport { validateNumericsAndDates } from '../utils/validate-numeric-and-dates.js';\n\ninterface GreaterThanEqual {\n /**\n * check for >=\n */\n <T extends number | bigint | Date>(actual: T, expected: T, message?: string): void;\n}\n\nexport const [greaterThanEqual, notGreaterThanEqual] = createAssertion({\n messages: {\n notGreaterThanEqual: 'Expected {{= it.actual }} to not be greater than or equal to {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not be greater than or equal to {{= it.expected }}'\n },\n test:\n (report): GreaterThanEqual =>\n (a: any, b: any, message?: string) => {\n validateNumericsAndDates(a, b);\n if (a < b) {\n return report({ status: 'notok', messageId: 'notGreaterThanEqual', actual: a, expected: b, message });\n }\n return report({ status: 'ok', expected: a, actual: b });\n }\n});\n","import { createAssertion, stringify } from 'hein-assertion-utils';\n\ninterface HasProperty {\n /**\n * check if object has a property\n * @param object\n * @param property a property in the object.\n * @example hasProperty({a: 1}, 'a');\n */\n <T, K extends keyof T>(object: T, property: K): void;\n /**\n * check if object has a property with a specific value\n * @param object\n * @param property a property in the object.\n * @param value\n * @example hasProperty({a: 1}, 'a', 1);\n */\n <T, K extends keyof T>(object: T, property: K, value: T[K]): void;\n}\n\nexport const [hasProperty, notHasProperty] = createAssertion({\n messages: {\n noProperty: 'Expected {{= it.actual }} to have property {{= it.expected }}',\n wrongValue: 'Expected {{= it.obj }} to have property {{= it.expected }} with value {{= it.value }}',\n not: 'Expected {{= it.actual }} to not have property {{= it.expected }}',\n notWrongValue: 'Expected {{= it.obj }} to not have property {{= it.expected }} with value {{= it.value }}'\n },\n test:\n (report): HasProperty =>\n <T extends object, K extends keyof T>(...args: [actual: T, expected: K, value?: T[K]]) => {\n const [actual, expected, value] = args;\n const actualStringified = stringify(actual);\n if (expected in actual) {\n if (args.length === 3) {\n if (actual[expected] === value) {\n return report({\n status: 'ok',\n messageId: 'notWrongValue',\n expected,\n actual: actualStringified as any,\n data: { value, expected, obj: actual }\n });\n }\n return report({\n status: 'notok',\n messageId: 'wrongValue',\n expected,\n actual: actualStringified as any,\n data: { value, obj: actualStringified as any },\n noStringify: true\n });\n }\n return report({ status: 'ok', noStringify: true, expected, actual: actualStringified as any });\n }\n return report({\n status: 'notok',\n messageId: 'noProperty',\n expected,\n actual: actualStringified as any,\n noStringify: true\n });\n }\n});\n","import isPlainObject from 'lodash/isPlainObject.js';\nimport { createAssertion } from 'hein-assertion-utils';\n\ninterface HasSize {\n /**\n * check if array has a specific length\n * @param array\n * @param length\n * @example hasSize([1, 2, 3], 3);\n */\n (array: any[], length: number, message?: string): void;\n /**\n * check if object has a specific amount of keys\n * @param object\n * @param length\n * @example hasSize({a: 1, b: 2}, 2);\n */\n (object: Record<string, unknown>, length: number, message?: string): void;\n /**\n * check if Map has a specific amount of keys\n * @param map\n * @param length\n * @example hasSize(new Map([['a', 1], ['b', 2]]), 2);\n */\n (map: Map<unknown, unknown>, length: number, message?: string): void;\n /**\n * check if Set has a specific amount of members\n * @param set\n * @param length\n * @example hasSize(new Set([1, 2, 3]), 3);\n */\n (set: Set<unknown>, length: number, message?: string): void;\n /**\n * check if string has a specific length\n * @param string\n * @param length\n * @example hasSize('abc', 3);\n */\n (string: string, length: number, message?: string): void;\n}\n\nexport const [hasSize, notHasSize] = createAssertion({\n messages: {\n array: 'Expected array to have length of {{= it.expected }}',\n object: 'Expected object to have size of {{= it.expected }}',\n map: 'Expected Map to have size of {{= it.expected }}',\n set: 'Expected Set to have size of {{= it.expected }}',\n string: 'Expected string to have length of {{= it.expected }}',\n not: 'Expected array to not have length of {{= it.expected }}',\n notObject: 'Expected object to not have size of {{= it.expected }}',\n notMap: 'Expected Map to not have size of {{= it.expected }}',\n notSet: 'Expected Set to not have size of {{= it.expected }}',\n notString: 'Expected string to not have length of {{= it.expected }}',\n invalidValue: 'Expected {{= it.actual }} to be an array, object, Map, Set or string'\n },\n test:\n (report): HasSize =>\n <T>(actual: T, expected: number, message?: string) => {\n if (Array.isArray(actual)) {\n if (actual.length === expected) {\n return report({ message, status: 'ok', expected, actual: actual.length });\n }\n return report({ message, status: 'notok', messageId: 'array', expected, actual: actual.length });\n }\n if (isPlainObject(actual)) {\n if (Object.keys(actual).length === expected) {\n return report({\n message,\n status: 'ok',\n messageId: 'notObject',\n expected,\n actual: Object.keys(actual).length\n });\n }\n return report({\n message,\n status: 'notok',\n messageId: 'object',\n expected,\n actual: Object.keys(actual).length\n });\n }\n if (actual instanceof Map) {\n if (actual.size === expected) {\n return report({ message, status: 'ok', messageId: 'notMap', expected, actual: actual.size });\n }\n return report({ message, status: 'notok', messageId: 'map', expected, actual: actual.size });\n }\n if (actual instanceof Set) {\n if (actual.size === expected) {\n return report({ message, status: 'ok', messageId: 'notSet', expected, actual: actual.size });\n }\n return report({ message, status: 'notok', messageId: 'set', expected, actual: actual.size });\n }\n if (typeof actual === 'string') {\n if (actual.length === expected) {\n return report({ message, status: 'ok', messageId: 'notString', expected, actual: actual.length });\n }\n return report({ message, status: 'notok', messageId: 'string', expected, actual: actual.length });\n }\n report({ message, status: 'notok', messageId: 'invalidValue', actual: typeof actual, noStringify: true });\n report({ message, status: 'ok', messageId: 'invalidValue', actual: typeof actual, noStringify: true });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\n\ninterface Includes {\n /**\n * check if array includes a specific element\n * @param array\n * @param element\n * @example includes([1, 2, 3], 2);\n * @example includes([1, 2, 3], 2, 3);\n */\n <T>(array: T[], ...elements: T[]): void;\n /**\n * check if string includes a specific string\n * @param string\n * @param element\n * @example includes('abc', 'b');\n * @example includes('abc', 'b', 'c');\n * @example includes('abc', 'bc');\n */\n (string: string, ...elements: string[]): void;\n}\n\nexport const [includes, notIncludes] = createAssertion({\n messages: {\n arrayMisses: 'Expected {{= it.actual }} to include {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not include {{= it.expected }}'\n },\n test:\n (report): Includes =>\n (actual: string | any[], ...elements) => {\n for (const element of elements) {\n if (actual.includes(element)) {\n report({\n messageId: 'not',\n status: 'ok',\n actual,\n expected: element\n });\n } else {\n report({\n messageId: 'arrayMisses',\n status: 'notok',\n actual,\n expected: element\n });\n }\n }\n }\n});\n","import isObjectLike from 'lodash/isObjectLike.js';\nimport { AssertionError, createAssertion } from 'hein-assertion-utils';\nimport { getType } from '../utils/get-type.js';\nimport { type Constructor } from '../utils/process-error.js';\n\ninterface InstanceOf {\n /**\n * check if value is an instance of a constructor\n * @param value\n * @param constructor\n * @example instanceOf(new Error(), Error);\n */\n <T extends Constructor>(value: InstanceType<T>, constructor: T): void;\n}\n\nexport const [instanceOf, notInstanceOf] = createAssertion({\n messages: {\n notInstanceOf: 'Expected {{= it.actual }} to be an instance of {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not be an instance of {{= it.expected }}'\n },\n test:\n (report): InstanceOf =>\n (actual: any, expected: Constructor) => {\n if (!isObjectLike(actual)) {\n throw new AssertionError(getType(actual), 'object', 'Expected value to be an object');\n }\n if (!(actual instanceof expected)) {\n return report({\n status: 'notok',\n messageId: 'notInstanceOf',\n expected: expected.name,\n actual: actual.constructor.name,\n noStringify: true\n });\n }\n return report({\n status: 'ok',\n expected: expected.name,\n actual: actual.constructor.name,\n messageId: 'not',\n noStringify: true\n });\n }\n});\n","import isPlainObject from 'lodash/isPlainObject.js';\nimport { createAssertion } from 'hein-assertion-utils';\n\ninterface IsEmpty {\n /**\n * check if array is empty\n * @param array\n * @example isEmpty([]);\n */\n <T>(array: T[], message?: string): void;\n /**\n * check if object is empty\n * @param object\n * @example isEmpty({});\n */\n (object: Record<string, unknown>, message?: string): void;\n /**\n * check if Map is empty\n * @param map\n * @example isEmpty(new Map());\n */\n <K, V>(map: Map<K, V>, message?: string): void;\n /**\n * check if Set is empty\n * @param set\n * @example isEmpty(new Set());\n */\n <T>(set: Set<T>, message?: string): void;\n}\n\nexport const [isEmpty, notIsEmpty] = createAssertion({\n messages: {\n array: 'Expected array to be empty',\n object: 'Expected object to be empty',\n map: 'Expected Map to be empty',\n set: 'Expected Set to be empty',\n not: 'Expected array to not be empty',\n notObject: 'Expected object to not be empty',\n notMap: 'Expected Map to not be empty',\n notSet: 'Expected Set to not be empty',\n invalidArgument: 'Expected {{= it.actual }} to be an array, object, Map, or Set'\n },\n test:\n (report): IsEmpty =>\n <T>(actual: T, message?: string) => {\n if (Array.isArray(actual)) {\n if (actual.length === 0) {\n return report({ message, status: 'ok', actual, expected: [] as any });\n }\n return report({ message, status: 'notok', messageId: 'array', actual, expected: [] as any });\n }\n if (isPlainObject(actual)) {\n if (Object.keys(actual).length === 0) {\n return report({ message, status: 'ok', messageId: 'notObject', actual });\n }\n return report({ message, status: 'notok', messageId: 'object', actual, expected: {} });\n }\n if (actual instanceof Map) {\n if (actual.size === 0) {\n return report({ message, status: 'ok', messageId: 'notMap', actual });\n }\n return report({ message, status: 'notok', messageId: 'map', actual, expected: new Map() });\n }\n if (actual instanceof Set) {\n if (actual.size === 0) {\n return report({ message, status: 'ok', messageId: 'notSet', actual });\n }\n return report({ message, status: 'notok', messageId: 'set', actual });\n }\n report({ message, status: 'notok', messageId: 'invalidArgument', actual });\n report({ message, status: 'ok', messageId: 'invalidArgument', actual });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\nimport { type ValueType, getType } from '../utils/get-type.js';\n\ninterface IsType {\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType('foo', 'string');\n * @example isType(1, 'number');\n * @example isType(1n, 'bigint');\n * @example isType(true, 'boolean');\n * @example isType(Symbol('foo'), 'symbol');\n * @example isType(undefined, 'undefined');\n * @example isType({}, 'object');\n * @example isType(() => {}, 'function');\n * @example isType(null, 'null');\n * @example isType(NaN, 'NaN');\n * @example isType([], 'array');\n */\n (value: unknown, expectedType: ValueType): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType('foo', 'string');\n */\n (value: string, expectedType: 'string'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(1, 'number');\n * @example isType(NaN, 'NaN');\n */\n (value: number, expectedType: 'number' | 'NaN'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(1n, 'bigint');\n */\n (value: bigint, expectedType: 'bigint'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(true, 'boolean');\n */\n (value: boolean, expectedType: 'boolean'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(Symbol('foo'), 'symbol');\n */\n (value: symbol, expectedType: 'symbol'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(Symbol('foo'), 'symbol');\n */\n (value: undefined, expectedType: 'undefined'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType({}, 'object');\n */\n (value: object, expectedType: 'object'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(() => {}, 'function');\n */\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n (value: Function, expectedType: 'function'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType(null, 'null');\n */\n (value: null, expectedType: 'null'): void;\n /**\n * check if value is of a specific type, nulls, NaN and arrays are specially handled\n * @param value\n * @param expectedType\n * @example isType([], 'array');\n */\n (value: any[], expectedType: 'array'): void;\n}\n\nexport const [isType, notIsType] = createAssertion({\n messages: {\n wrongType: 'Expected {{= it.actual }} to be a(n) {{= it.expected }}',\n not: `Expected {{= it.actual }} to not be a(n) {{= it.expected }}`\n },\n test:\n (report): IsType =>\n (value: any, expectedType: ValueType) => {\n const actualType = getType(value);\n if (actualType !== expectedType) {\n return report({\n status: 'notok',\n messageId: 'wrongType',\n actual: actualType,\n expected: expectedType,\n noStringify: true\n });\n }\n return report({\n status: 'ok',\n messageId: 'not',\n actual: actualType,\n expected: expectedType,\n noStringify: true\n });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\nimport { validateNumericsAndDates } from '../utils/validate-numeric-and-dates.js';\n\ninterface LesserThan {\n /**\n * check for <\n */\n <T extends number | bigint | Date>(actual: T, expected: T, message?: string): void;\n}\n\nexport const [lessThan, notLessThan] = createAssertion({\n messages: {\n lesserThan: 'Expected {{= it.actual }} to be less than {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not be less than {{= it.expected }}'\n },\n test:\n (report): LesserThan =>\n (actual: any, expected: any, message?: string) => {\n validateNumericsAndDates(actual, expected);\n if (actual >= expected) {\n return report({ status: 'notok', messageId: 'lesserThan', actual, expected, message });\n }\n return report({ status: 'ok', actual, expected, message, messageId: 'not' });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\nimport { validateNumericsAndDates } from '../utils/validate-numeric-and-dates.js';\n\ninterface LessThanEqual {\n /**\n * check for <=\n */\n <T extends number | bigint | Date>(actual: T, expected: T, message?: string): void;\n}\n\nexport const [lessThanEqual, notLessThanEqual] = createAssertion({\n messages: {\n lesserThanEqual: 'Expected {{= it.actual }} to be less than or equal to {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not be less than or equal to {{= it.expected }}'\n },\n test:\n (report): LessThanEqual =>\n (actual: any, expected: any, message?: string) => {\n validateNumericsAndDates(actual, expected);\n if (actual > expected) {\n return report({\n status: 'notok',\n messageId: 'lesserThanEqual',\n actual,\n expected,\n message,\n noStringify: true\n });\n }\n return report({ status: 'ok', actual, expected, message, messageId: 'not', noStringify: true });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\n\ninterface IsMatch {\n /**\n * check if string matches regex\n * @param actual\n * @param regex\n * @example match('foo', /foo/);\n * @example notMatch('foo', /bar/);\n */\n (actual: string, regex: RegExp): void;\n}\n\nexport const [match, notMatch] = createAssertion({\n messages: {\n noMatch: 'Expected {{= it.actual }} to match {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not match {{= it.expected }}'\n },\n test:\n (report): IsMatch =>\n (actual: string, regex: RegExp) => {\n if (!regex.test(actual)) {\n return report({\n messageId: 'noMatch',\n status: 'notok',\n actual,\n noStringify: true,\n expected: regex.toString()\n });\n }\n report({\n status: 'ok',\n actual,\n expected: regex.toString(),\n noStringify: true\n });\n }\n});\n","import { type Report } from 'hein-assertion-utils';\n\nexport interface Constructor<T = any> {\n new (...args: any[]): T;\n}\n\nexport type ErrorPredicate = (error: Error) => boolean;\n\nexport const isConstructor = (value: any): value is Constructor => {\n return typeof value === 'function' && value.prototype && value.prototype.isPrototypeOf;\n};\n\nexport const isErrorConstructor = (value: any): value is Constructor<Error> => {\n return isConstructor(value) && value.prototype instanceof Error;\n};\n\ntype ThrowsMessages =\n | 'invalidArgument'\n | 'nonError'\n | 'throws'\n | 'invalidConstructor'\n | 'predicate'\n | 'regex'\n | 'not'\n | 'notConstructor'\n | 'notPredicate'\n | 'notRegex';\n\nexport const processError = (report: Report<ThrowsMessages>, error: Error, narrowerOrMessage, message) => {\n message = (typeof narrowerOrMessage === 'string' ? narrowerOrMessage : message) ?? null;\n\n if (!(error instanceof Error)) {\n return report({\n noStringify: true,\n status: 'notok',\n messageId: 'nonError',\n actual: typeof error,\n expected: 'Error'\n });\n }\n if (narrowerOrMessage) {\n if (isConstructor(narrowerOrMessage)) {\n if (!(error instanceof narrowerOrMessage)) {\n return report({\n noStringify: true,\n status: 'notok',\n messageId: 'invalidConstructor',\n actual: error.name,\n expected: narrowerOrMessage.name,\n message\n });\n }\n return report({\n noStringify: true,\n status: 'ok',\n messageId: 'notConstructor',\n actual: error.name,\n expected: narrowerOrMessage.name,\n message\n });\n } else if (typeof narrowerOrMessage === 'function') {\n if (!(narrowerOrMessage as ErrorPredicate)(error)) {\n return report({\n noStringify: true,\n status: 'notok',\n messageId: 'predicate',\n actual: error,\n expected: null,\n message\n });\n }\n return report({\n noStringify: true,\n status: 'ok',\n messageId: 'notPredicate',\n actual: error,\n expected: null,\n message\n });\n } else if (typeof narrowerOrMessage === 'string') {\n return report({\n noStringify: true,\n status: 'ok',\n messageId: 'throws',\n actual: error,\n message: narrowerOrMessage\n });\n } else if (narrowerOrMessage instanceof RegExp) {\n if (!narrowerOrMessage.test(error.message)) {\n return report({\n noStringify: true,\n status: 'notok',\n messageId: 'regex',\n actual: error.message,\n expected: narrowerOrMessage.toString(),\n message\n });\n }\n return report({\n noStringify: true,\n status: 'ok',\n messageId: 'notRegex',\n actual: error.message,\n expected: narrowerOrMessage.toString(),\n message\n });\n }\n }\n return report({ noStringify: true, status: 'ok', actual: error, message });\n};\n","import { createAssertion } from 'hein-assertion-utils';\nimport { type Constructor, type ErrorPredicate, processError } from '../utils/process-error.js';\n\ninterface Rejects {\n /**\n * check if promise rejects\n * @param promise\n * @example rejects(Promise.reject());\n */\n (promise: Promise<any>, message?: string): Promise<void>;\n /**\n * check if promise rejects with an instance of constructor\n * @param promise\n * @param constructor - expected error constructor\n * @example rejects(Promise.reject(new Error()), Error);\n */\n (promise: Promise<any>, constructor: Constructor, message?: string): Promise<void>;\n /**\n * check if promise rejects with a specific error message\n * @param promise\n * @param regex - expected error message regex\n * @example rejects(Promise.reject(new Error('This is worrying)), /worrying/);\n */\n (promise: Promise<any>, constructor: RegExp, message?: string): Promise<void>;\n /**\n * check if promise rejects with and matches the predicate function\n * @param promise\n * @param predicate - predicate function that receives the error and returns boolean\n * @example rejects(Promise.reject(new Error('This is worrying')), (error) => error.message === 'This is worrying');));\n */\n (promise: Promise<any>, constructor: ErrorPredicate, message?: string): Promise<void>;\n}\n\nexport const [rejects, notRejects] = createAssertion({\n messages: {\n invalidArgument: 'Expected {{= it.actual }} to be a Promise',\n nonError: 'Expected Promise to reject with an instance of Error',\n throws: 'Expected Promise to reject',\n invalidConstructor: 'Expected Promise to reject with {{= it.expected }}',\n predicate: 'Expected {{= it.actual }} to match predicate function',\n regex: 'Expected Promise to reject with an error matching {{= it.expected }}',\n not: 'Expected Promise to not reject',\n notConstructor: 'Expected Promise to not reject with a {{= it.expected }}',\n notPredicate: 'Expected {{= it.actual }} to not match predicate function',\n notRegex: 'Expected Promise to not reject with an error matching {{= it.expected }}'\n },\n test:\n (report): Rejects =>\n async (promise: Promise<any>, narrowerOrMessage?, message?) => {\n // TODO: invalid argument in not case\n if (!promise || typeof promise.then !== 'function') {\n report({\n noStringify: true,\n status: 'notok',\n messageId: 'invalidArgument',\n actual: typeof promise,\n expected: 'Promise'\n });\n return;\n }\n try {\n await promise;\n } catch (error) {\n processError(report, error, narrowerOrMessage, message);\n return;\n }\n report({\n noStringify: true,\n status: 'notok',\n messageId: 'throws',\n message: typeof narrowerOrMessage === 'string' ? narrowerOrMessage : message\n });\n return;\n }\n});\n","import { AssertionError, createAssertion } from 'hein-assertion-utils';\nimport { getType } from '../utils/get-type.js';\nimport { type Constructor, type ErrorPredicate, processError } from '../utils/process-error.js';\n\nexport type ThrowsCallback = () => unknown;\n\ninterface Throw {\n /**\n * check if function throws an error\n * @param callback\n * @example throws(() => { throw new Error('foo'); });\n * @example throws(() => { throw new TypeError('foo'); }, TypeError);\n */\n (callback: ThrowsCallback, message?: string): void;\n /**\n * check if function throws an error matching the constructor\n * @param callback\n * @example throws(() => { throw new TypeError('foo'); }, TypeError);\n */\n (callback: ThrowsCallback, expectedError: Constructor, message?: string): void;\n /**\n * check if function throws an error matching the regex\n * @param callback\n * @example throws(() => { throw new Error('foo'); });\n * @example throws(() => { throw new TypeError('foo'); }, /foo/);\n */\n (callback: ThrowsCallback, expectedError: RegExp, message?: string): void;\n /**\n * check if function throws an error matching the predicate function\n * @param callback\n * @example throws(() => { throw new TypeError('foo'); }, (error) => error.message === 'foo');\n */\n (callback: ThrowsCallback, expectedError: ErrorPredicate, message?: string): void;\n}\n\nconst messages = {\n nonError: 'Expected function to throw an instance of Error',\n throws: 'Expected function to throw',\n invalidConstructor: 'Expected function to throw {{= it.expected }}',\n predicate: 'Expected {{= it.actual }} to match predicate function',\n regex: 'Expected function to throw an error matching {{= it.expected }}',\n not: 'Expected function to not throw',\n notConstructor: 'Expected function to not throw a {{= it.expected }}',\n notPredicate: 'Expected function to not throw an error matching the predicate',\n notRegex: 'Expected function to not throw an error matching {{= it.expected }}'\n};\n\nexport const [throws, notThrows] = createAssertion({\n messages: messages,\n test: (report) =>\n ((callback, narrowerOrMessage, message) => {\n const argumentType = getType(callback);\n if (argumentType !== 'function') {\n throw new AssertionError(argumentType, 'function', `Expected ${ argumentType } to be a function`);\n }\n try {\n callback();\n } catch (error) {\n return processError(report, error, narrowerOrMessage, message);\n }\n return report({\n noStringify: true,\n status: 'notok',\n messageId: 'throws',\n message: typeof narrowerOrMessage === 'string' ? narrowerOrMessage : message\n });\n }) as Throw\n});\n","import { createAssertion, stringify } from 'hein-assertion-utils';\nimport get from 'lodash/get.js';\nimport has from 'lodash/has.js';\n\ninterface DeepHasProperty {\n /**\n * check if object has a property\n * @param object\n * @param property a property in the object. Can be a path like 'a.b.c'\n * @example deepHasProperty([{a: {b: {c: 1}}}], '[0].a.b.c');\n */\n (object: any, property: string): void;\n /**\n * check if object has a property with a specific value\n * @param object\n * @param property a property in the object. Can be a path like 'a.b.c'\n * @param value\n * @example deepHasProperty([{a: {b: {c: 1}}}], '[0].a.b.c', 1);\n */\n (object: any, property: string, value: any): void;\n}\n\nexport const [deepHasProperty, deepNotHasProperty] = createAssertion({\n messages: {\n noProperty: 'Expected {{= it.actual }} to have property {{= it.expected }}',\n wrongValue: 'Expected {{= it.obj }} to have property {{= it.expected }} with value {{= it.value }}',\n not: 'Expected {{= it.actual }} to not have property {{= it.expected }}',\n notWrongValue: 'Expected {{= it.obj }} to not have property {{= it.expected }} with value {{= it.value }}'\n },\n test:\n (report): DeepHasProperty =>\n (...args: [actual: any, expected: string, value?: any]) => {\n const [actual, expected, value] = args;\n const actualStringified = stringify(actual);\n if (has(actual, expected)) {\n if (args.length === 3) {\n const actualValue = get(actual, expected);\n if (actualValue === value) {\n return report({\n status: 'ok',\n messageId: 'notWrongValue',\n expected: value,\n actual: actualValue,\n data: { value, expected, obj: actualStringified },\n noStringify: true\n });\n }\n return report({\n status: 'notok',\n messageId: 'wrongValue',\n expected: value,\n actual: actualValue,\n data: { value, expected, obj: actualStringified },\n noStringify: true\n });\n }\n return report({ status: 'ok', noStringify: true, expected, actual: actualStringified });\n }\n return report({\n status: 'notok',\n messageId: 'noProperty',\n expected,\n actual: actualStringified,\n noStringify: true\n });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\n\ninterface StartsWith {\n /**\n * check if string starts with start\n * @param string\n * @param start\n * @example startsWith('foo', 'f');\n */\n (string: string, start: string): void;\n}\n\nexport const [startsWith, notStartsWith] = createAssertion({\n messages: {\n wrongStart: 'Expected {{= it.actual }} to start with {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not start with {{= it.expected }}'\n },\n test:\n (report): StartsWith =>\n (actual: string, start: string) => {\n if (actual.startsWith(start)) {\n report({\n messageId: 'not',\n status: 'ok',\n actual,\n expected: start\n });\n } else {\n report({\n messageId: 'wrongStart',\n status: 'notok',\n actual,\n expected: start\n });\n }\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\n\n// TODO: add message\n\ninterface EndsWith {\n /**\n * check if string ends with a specific string\n * @param string\n * @param end\n */\n (string: string, end: string): void;\n}\n\nexport const [endsWith, notEndsWith] = createAssertion({\n messages: {\n wrongEnd: 'Expected {{= it.actual }} to end with {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not end with {{= it.expected }}'\n },\n test:\n (report): EndsWith =>\n (actual: string, end: string) => {\n if (actual.endsWith(end)) {\n report({\n messageId: 'not',\n status: 'ok',\n actual,\n expected: end\n });\n } else {\n report({\n messageId: 'wrongEnd',\n status: 'notok',\n actual,\n expected: end\n });\n }\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\n\ninterface IsBefore {\n /**\n * check that date is before another date\n */\n <T extends Date>(actual: T, expected: T, message?: string): void;\n}\n\nexport const [isBefore, notBefore] = createAssertion({\n messages: {\n after: 'Expected {{= it.actual }} to be before {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not be before {{= it.expected }}'\n },\n test:\n (report): IsBefore =>\n (actual: Date, expected: Date) => {\n if (actual >= expected) {\n return report({\n messageId: 'after',\n status: 'notok',\n actual,\n expected\n });\n }\n return report({\n status: 'ok',\n actual,\n expected\n });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\n\ninterface IsAfter {\n /**\n * check that date is after another date\n */\n <T extends Date>(actual: T, expected: T): void;\n}\n\nexport const [isAfter, notAfter] = createAssertion({\n messages: {\n before: 'Expected {{= it.actual }} to be after {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not be after {{= it.expected }}'\n },\n test:\n (report): IsAfter =>\n (actual: Date, expected: Date) => {\n if (actual <= expected) {\n return report({\n messageId: 'before',\n status: 'notok',\n actual,\n expected\n });\n }\n return report({\n status: 'ok',\n actual,\n expected\n });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\n\ninterface IsBetweenOptions {\n inclusive?: boolean;\n}\n\ninterface IsBetween {\n /**\n * check that date is Between another date\n */\n <T extends Date>(actual: T, start: T, end: T, options?: IsBetweenOptions): void;\n <T extends number>(actual: T, start: T, end: T, options?: IsBetweenOptions): void;\n}\n\nexport const [isBetween, notBetween] = createAssertion({\n messages: {\n notBetween: 'Expected {{= it.actual }} to be between {{= it.lesser }} and {{= it.greater }}',\n not: 'Expected {{= it.actual }} to not be between {{= it.lesser }} and {{= it.greater }}'\n },\n test:\n (report): IsBetween =>\n <T extends Date | number>(actual: T, start: T, end: T, { inclusive = true }: IsBetweenOptions = {}) => {\n const [greater, lesser] = end > start ? [end, start] : [start, end];\n const inclusivelyBetween = actual <= greater && actual >= lesser;\n const exclusivelyBetween = actual < greater && actual > lesser;\n if (inclusive && !inclusivelyBetween) {\n return report({\n messageId: 'notBetween',\n status: 'notok',\n actual,\n data: { lesser, greater }\n });\n }\n if (!inclusive && !exclusivelyBetween) {\n return report({\n messageId: 'notBetween',\n status: 'notok',\n actual,\n data: { lesser, greater }\n });\n }\n return report({\n status: 'ok',\n actual,\n data: { lesser, greater }\n });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\n\ninterface InBallpark {\n /**\n * check if a number is in ballpark of another number. See also roundTo\n * @param actual\n * @param expected\n * @param [allowedDifferenceMultiplier=0.1] - a number between 0 and 1 (exclusive). 0.1 (default) means 10% difference is allowed.\n * @example inBallpark(1, 1.1);\n * @example inBallpark(1, 1.1, 0.1);\n */\n (actual: number, expected: number, allowedDifferenceMultiplier?: number): void;\n}\n\nexport const [inBallpark, notInBallpark] = createAssertion({\n messages: {\n miss: 'Expected {{= it.actual }} to be in ballpark of {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not be in ballpark of {{= it.expected }}',\n invalidMultiplier: 'Expected multiplier to be between 0 and 1'\n },\n test:\n (report): InBallpark =>\n (actual: number, expected: number, allowedDifference = 0.1) => {\n const absActual = Math.abs(actual);\n const absExpected = Math.abs(expected);\n if (allowedDifference <= 0 || allowedDifference >= 1) {\n report({ status: 'ok', messageId: 'invalidMultiplier', actual: allowedDifference });\n return report({ status: 'notok', messageId: 'invalidMultiplier', actual: allowedDifference });\n }\n if (\n absActual <= absExpected * (1 + allowedDifference) &&\n absActual >= absExpected * (1 - allowedDifference)\n ) {\n return report({ status: 'ok', expected, actual });\n }\n return report({ status: 'notok', messageId: 'miss', expected, actual });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\n\ninterface RoundTo {\n /**\n * check if value rounds to target\n * @param actual\n * @param expected\n * @param [decimals=0] - number of decimals to round to, defaults to 0\n * @example roundTo(1.234, 1.23, 2);\n */\n (actual: number, expected: number, decimals?: number): void;\n}\n\nexport const [roundTo, notRoundTo] = createAssertion({\n messages: {\n miss: 'Expected {{= it.actual }} to round to {{= it.expected }}',\n tooManyDecimals:\n 'Invalid argument for target, decimals for target ({{= it.expected }}) cannot be less than rounding decimals ({{= it.decimals }})',\n not: 'Expected {{= it.actual }} to not round to {{= it.expected }}'\n },\n test:\n (report): RoundTo =>\n (actual: number, expected: number, decimals = 0) => {\n if (expected.toString().split('.')[1]?.length > decimals) {\n report({\n status: 'notok',\n messageId: 'tooManyDecimals',\n expected,\n actual,\n data: { decimals },\n noStringify: true\n });\n report({\n status: 'ok',\n messageId: 'tooManyDecimals',\n expected,\n actual,\n data: { decimals },\n noStringify: true\n });\n return true;\n }\n if (round(actual, decimals) === expected) {\n return report({ status: 'ok', expected, actual });\n }\n return report({ status: 'notok', messageId: 'miss', expected, actual });\n }\n});\n\nconst round = (value: number, decimals: number) => {\n const factor = 10 ** decimals;\n return Math.round(value * factor) / factor;\n};\n","import { createAssertion } from 'hein-assertion-utils';\nimport { match } from '../utils/match.js';\n\ninterface HasMembersOptions {\n /**\n * check for deep equality (ie {a: 1} === {a: 1})\n * @default false\n * @example\n * hasMembers([{ a: 1 }], [{ a: 1 }], { deep: true });\n */\n deep?: boolean;\n /**\n * use partial matching (ie {a: 1, b: 2} === {a: 1})\n * implies deep\n * @default false\n * @example\n * hasMembers([{ a: 1, b: 2 }], [{ a: 1 }], { partial: true });\n */\n partial?: boolean;\n /**\n * check that all the members in the first array are present in the second one\n * @default false\n * @example\n * hasMembers([1, 2], [2, 1], { same: true });\n * notHasMembers([1, 2], [1], { same: true});\n */\n same?: boolean;\n /**\n * check that the members in the first array are in the same order as the second one\n * @default false\n * @example\n * hasMembers([1, 2], [1, 2], { ordered: true });\n * notHasMembers([1, 2], [2, 1], { ordered: true });\n */\n ordered?: boolean;\n}\n\ninterface HasMembers {\n /**\n * check that the members in second array are present in the first one\n * @example\n * hasMembers([1], [1]);\n * hasMembers([1, 2], [2, 1]);\n * hasMembers([{ a: 1 }], [{ a: 1 }], { deep: true });\n */\n <T>(actual: T[], expected: T[], options?: HasMembersOptions, message?: string): void;\n}\n\nexport const [hasMembers, notHasMembers] = createAssertion({\n messages: {\n hasMembers: 'Expected {{= it.actual }} to have members {{= it.expected }}',\n same: 'Expected {{= it.actual }} to have same members as {{= it.expected }}',\n order: 'Expected {{= it.actual }} to have ordered members {{= it.expected }}',\n not: 'Expected {{= it.actual }} to not have members {{= it.expected }}',\n notSame: 'Expected {{= it.actual }} to not have same members as {{= it.expected }}'\n },\n test:\n (report): HasMembers =>\n <T>(\n actual: T[],\n expected: T[],\n { deep = false, partial = false, ordered = false, same = false }: HasMembersOptions = {},\n message?: string\n ) => {\n let lastIndex = -1;\n for (const item of expected) {\n if (deep || partial) {\n const actualIndex = actual.findIndex((actualItem, index) => {\n if (!ordered) {\n return match(actualItem, item, { partial });\n }\n if (lastIndex >= index) {\n return false;\n }\n return match(actualItem, item, { partial });\n });\n lastIndex = actualIndex;\n if (actualIndex === -1) {\n return report({\n status: 'notok',\n messageId: ordered ? 'order' : 'hasMembers',\n actual,\n expected,\n message\n });\n }\n } else {\n if (actual.includes(item)) {\n if (ordered && lastIndex >= actual.indexOf(item, lastIndex + 1)) {\n return report({ status: 'notok', messageId: 'order', actual, expected, message });\n }\n lastIndex = actual.indexOf(item, lastIndex + 1);\n } else {\n return report({ status: 'notok', messageId: 'hasMembers', actual, expected, message });\n }\n }\n }\n if (same && actual.length !== expected.length) {\n return report({ status: 'notok', messageId: 'same', actual, expected, message });\n }\n return report({ status: 'ok', messageId: same ? 'notSame' : 'not', actual, expected, message });\n }\n});\n","import { createAssertion } from 'hein-assertion-utils';\nimport castArray from 'lodash/castArray.js';\n\ninterface HasKeys {\n /**\n * check if object has keys\n * @param object\n * @param keys a key or array of keys in the object.\n * @example hasKeys({a: 1}, 'a');\n * @example hasKeys({a: 1, b: 2}, ['a', 'b']);\n */\n <T extends Record<string, any>, K extends keyof T>(object: T, keys: K[] | K, message?: string): void;\n <K, T extends Map<K, any>>(object: T, keys: K[] | K, message?: string): void;\n}\n\nexport const [hasKeys, notHasKeys] = createAssertion({\n messages: {\n noKey: 'Expected {{= it.object }} to have keys {{= it.expected }}',\n not: 'Expected {{= it.object }} to not have keys {{= it.expected }}'\n },\n test:\n (report): HasKeys =>\n (object, keys, message) => {\n const keysArray = castArray(keys);\n if (object instanceof Map) {\n for (const key of keysArray) {\n if (!object.has(key)) {\n report({\n status: 'notok',\n message,\n messageId: 'noKey',\n data: { object },\n actual: [...object.keys()],\n expected: keysArray\n });\n return;\n }\n }\n report({ status: 'ok', data: { object }, actual: [...object.keys()], expected: keysArray });\n return;\n }\n for (const key of keysArray) {\n if (!(key in object)) {\n report({\n status: 'notok',\n message,\n messageId: 'noKey',\n data: { object },\n actual: object,\n expected: keysArray\n });\n return;\n }\n }\n report({ status: 'ok', data: { object }, actual: Object.keys(object), expected: keysArray });\n }\n});\n","export { deepEqual, notDeepEqual } from './assert/deep-equal.js';\nexport { equal, notEqual } from './assert/equal.js';\nexport { greaterThan, notGreaterThan } from './assert/greater-than.js';\nexport { greaterThanEqual, notGreaterThanEqual } from './assert/greater-than-equal.js';\nexport { hasProperty, notHasProperty } from './assert/has-property.js';\nexport { hasSize, notHasSize } from './assert/has-size.js';\nexport { includes, notIncludes } from './assert/includes.js';\nexport { instanceOf, notInstanceOf } from './assert/instance-of.js';\nexport { isEmpty, notIsEmpty } from './assert/is-empty.js';\nexport { isType, notIsType } from './assert/is-type.js';\nexport { lessThan, notLessThan } from './assert/less-than.js';\nexport { lessThanEqual, notLessThanEqual } from './assert/less-than-equal.js';\nexport { match, notMatch } from './assert/match.js';\nexport { notRejects, rejects } from './assert/rejects.js';\nexport { notThrows, throws } from './assert/throws.js';\nexport { deepHasProperty, deepNotHasProperty } from './assert/deep-has-property.js';\nexport { startsWith, notStartsWith } from './assert/starts-with.js';\nexport { endsWith, notEndsWith } from './assert/ends-with.js';\nexport { isBefore, notBefore } from './assert/is-before.js';\nexport { isAfter, notAfter } from './assert/is-after.js';\nexport { isBetween, notBetween } from './assert/is-between.js';\nexport { inBallpark, notInBallpark } from './assert/in-ballpark.js';\nexport { roundTo, notRoundTo } from './assert/round-to.js';\nexport { hasMembers, notHasMembers } from './assert/has-members.js';\nexport { hasKeys, notHasKeys } from './assert/has-keys.js';\n\nexport const assert = () => {\n throw new Error('Not implemented');\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAa,OAAO,GAAY,MAAe;AAC3C,QAAQ,KAAK,CAAC,KAAO,CAAC,KAAK;;;;;ACE/B,MAAMA,mBAAkC,QAAQ;AAOhD,MAAa,oBAAoB,aAA2C;CACxE,MAAM,cAAc,UAAwB;AACxC,SAAO,SAAS,MAAM;;AAE1B,YAAW,oBAAoB;AAC/B,QAAO;;AAGX,MAAa,MAAM,uBAAuB,KAAK;AAE/C,MAAa,gBAAgB,UAAoC,SAAS,MAAM;AAOhF,MAAaC,WAAY,QAAW,UAAa,EAAE,SAAS,OAAO,UAAU,UAAwB,EAAE,KAAc;AACjH,KAAI,WAAW,SACX,QAAO;AAEX,KAAI,aAAa,SAAS,CACtB,QAAO,SAAS,OAAO;AAG3B,KAAI,UAAU,QAAQ,YAAY,QAAS,qCAAc,OAAO,IAAI,qCAAc,SAAS,CACvF,QAAO,WAAW,UAAU,aAAa;CAE7C,IAAI,SAAS;AACb,KAAI,kBAAkB,OAAO,oBAAoB,KAAK;AAClD,MAAI,EAAE,kBAAkB,OAAO,oBAAoB,KAC/C,QAAO;AAEX,MAAI,OAAO,SAAS,SAAS,QAAQ,CAAC,QAClC,UAAS;AAEb,OAAK,MAAM,CAAC,KAAK,UAAU,SAAS,SAAS,EAAE;AAC3C,OAAI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