bupkis 0.18.2 → 1.0.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 (390) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +1 -1
  3. package/dist/assertion/assertion-async.cjs +268 -0
  4. package/dist/assertion/assertion-async.cjs.map +1 -0
  5. package/dist/assertion/assertion-async.d.cts +40 -0
  6. package/dist/assertion/assertion-async.d.cts.map +1 -0
  7. package/dist/assertion/assertion-async.d.ts +40 -0
  8. package/dist/assertion/assertion-async.d.ts.map +1 -0
  9. package/dist/assertion/assertion-async.js +259 -0
  10. package/dist/assertion/assertion-async.js.map +1 -0
  11. package/dist/assertion/assertion-standard-schema-async.cjs +132 -0
  12. package/dist/assertion/assertion-standard-schema-async.cjs.map +1 -0
  13. package/dist/assertion/assertion-standard-schema-async.d.cts +52 -0
  14. package/dist/assertion/assertion-standard-schema-async.d.cts.map +1 -0
  15. package/dist/assertion/assertion-standard-schema-async.d.ts +52 -0
  16. package/dist/assertion/assertion-standard-schema-async.d.ts.map +1 -0
  17. package/dist/assertion/assertion-standard-schema-async.js +128 -0
  18. package/dist/assertion/assertion-standard-schema-async.js.map +1 -0
  19. package/dist/assertion/assertion-standard-schema-sync.cjs +141 -0
  20. package/dist/assertion/assertion-standard-schema-sync.cjs.map +1 -0
  21. package/dist/assertion/assertion-standard-schema-sync.d.cts +52 -0
  22. package/dist/assertion/assertion-standard-schema-sync.d.cts.map +1 -0
  23. package/dist/assertion/assertion-standard-schema-sync.d.ts +52 -0
  24. package/dist/assertion/assertion-standard-schema-sync.d.ts.map +1 -0
  25. package/dist/assertion/assertion-standard-schema-sync.js +137 -0
  26. package/dist/assertion/assertion-standard-schema-sync.js.map +1 -0
  27. package/dist/assertion/assertion-sync.cjs +281 -0
  28. package/dist/assertion/assertion-sync.cjs.map +1 -0
  29. package/dist/assertion/assertion-sync.d.cts +60 -0
  30. package/dist/assertion/assertion-sync.d.cts.map +1 -0
  31. package/dist/assertion/assertion-sync.d.ts +60 -0
  32. package/dist/assertion/assertion-sync.d.ts.map +1 -0
  33. package/dist/assertion/assertion-sync.js +275 -0
  34. package/dist/assertion/assertion-sync.js.map +1 -0
  35. package/dist/assertion/assertion-types.cjs +20 -0
  36. package/dist/assertion/assertion-types.cjs.map +1 -0
  37. package/dist/assertion/assertion-types.d.cts +1086 -0
  38. package/dist/assertion/assertion-types.d.cts.map +1 -0
  39. package/dist/assertion/assertion-types.d.ts +1086 -0
  40. package/dist/assertion/assertion-types.d.ts.map +1 -0
  41. package/dist/assertion/assertion-types.js +19 -0
  42. package/dist/assertion/assertion-types.js.map +1 -0
  43. package/dist/assertion/assertion.cjs +382 -0
  44. package/dist/assertion/assertion.cjs.map +1 -0
  45. package/dist/assertion/assertion.d.cts +109 -0
  46. package/dist/assertion/assertion.d.cts.map +1 -0
  47. package/dist/assertion/assertion.d.ts +109 -0
  48. package/dist/assertion/assertion.d.ts.map +1 -0
  49. package/dist/assertion/assertion.js +375 -0
  50. package/dist/assertion/assertion.js.map +1 -0
  51. package/dist/assertion/create.cjs +148 -0
  52. package/dist/assertion/create.cjs.map +1 -0
  53. package/dist/assertion/create.d.cts +85 -0
  54. package/dist/assertion/create.d.cts.map +1 -0
  55. package/dist/assertion/create.d.ts +85 -0
  56. package/dist/assertion/create.d.ts.map +1 -0
  57. package/dist/assertion/create.js +143 -0
  58. package/dist/assertion/create.js.map +1 -0
  59. package/dist/assertion/format-assertion-failure.cjs +63 -0
  60. package/dist/assertion/format-assertion-failure.cjs.map +1 -0
  61. package/dist/assertion/format-assertion-failure.d.cts +21 -0
  62. package/dist/assertion/format-assertion-failure.d.cts.map +1 -0
  63. package/dist/assertion/format-assertion-failure.d.ts +21 -0
  64. package/dist/assertion/format-assertion-failure.d.ts.map +1 -0
  65. package/dist/assertion/format-assertion-failure.js +59 -0
  66. package/dist/assertion/format-assertion-failure.js.map +1 -0
  67. package/dist/assertion/impl/assertion-util.cjs +68 -0
  68. package/dist/assertion/impl/assertion-util.cjs.map +1 -0
  69. package/dist/assertion/impl/assertion-util.d.cts +36 -0
  70. package/dist/assertion/impl/assertion-util.d.cts.map +1 -0
  71. package/dist/assertion/impl/assertion-util.d.ts +36 -0
  72. package/dist/assertion/impl/assertion-util.d.ts.map +1 -0
  73. package/dist/assertion/impl/assertion-util.js +62 -0
  74. package/dist/assertion/impl/assertion-util.js.map +1 -0
  75. package/dist/assertion/impl/async-iterable.cjs +627 -0
  76. package/dist/assertion/impl/async-iterable.cjs.map +1 -0
  77. package/dist/assertion/impl/async-iterable.d.cts +406 -0
  78. package/dist/assertion/impl/async-iterable.d.cts.map +1 -0
  79. package/dist/assertion/impl/async-iterable.d.ts +406 -0
  80. package/dist/assertion/impl/async-iterable.d.ts.map +1 -0
  81. package/dist/assertion/impl/async-iterable.js +624 -0
  82. package/dist/assertion/impl/async-iterable.js.map +1 -0
  83. package/dist/assertion/impl/async-parametric.cjs +412 -0
  84. package/dist/assertion/impl/async-parametric.cjs.map +1 -0
  85. package/dist/assertion/impl/async-parametric.d.cts +278 -0
  86. package/dist/assertion/impl/async-parametric.d.cts.map +1 -0
  87. package/dist/assertion/impl/async-parametric.d.ts +278 -0
  88. package/dist/assertion/impl/async-parametric.d.ts.map +1 -0
  89. package/dist/assertion/impl/async-parametric.js +409 -0
  90. package/dist/assertion/impl/async-parametric.js.map +1 -0
  91. package/dist/assertion/impl/async.cjs +56 -0
  92. package/dist/assertion/impl/async.cjs.map +1 -0
  93. package/dist/assertion/impl/async.d.cts +179 -0
  94. package/dist/assertion/impl/async.d.cts.map +1 -0
  95. package/dist/assertion/impl/async.d.ts +179 -0
  96. package/dist/assertion/impl/async.d.ts.map +1 -0
  97. package/dist/assertion/impl/async.js +39 -0
  98. package/dist/assertion/impl/async.js.map +1 -0
  99. package/dist/assertion/impl/index.cjs +37 -0
  100. package/dist/assertion/impl/index.cjs.map +1 -0
  101. package/dist/assertion/impl/index.d.cts +21 -0
  102. package/dist/assertion/impl/index.d.cts.map +1 -0
  103. package/dist/assertion/impl/index.d.ts +21 -0
  104. package/dist/assertion/impl/index.d.ts.map +1 -0
  105. package/dist/assertion/impl/index.js +21 -0
  106. package/dist/assertion/impl/index.js.map +1 -0
  107. package/dist/assertion/impl/iteration-util.cjs +297 -0
  108. package/dist/assertion/impl/iteration-util.cjs.map +1 -0
  109. package/dist/assertion/impl/iteration-util.d.cts +12 -0
  110. package/dist/assertion/impl/iteration-util.d.cts.map +1 -0
  111. package/dist/assertion/impl/iteration-util.d.ts +12 -0
  112. package/dist/assertion/impl/iteration-util.d.ts.map +1 -0
  113. package/dist/assertion/impl/iteration-util.js +282 -0
  114. package/dist/assertion/impl/iteration-util.js.map +1 -0
  115. package/dist/assertion/impl/snapshot.cjs +276 -0
  116. package/dist/assertion/impl/snapshot.cjs.map +1 -0
  117. package/dist/assertion/impl/snapshot.d.cts +278 -0
  118. package/dist/assertion/impl/snapshot.d.cts.map +1 -0
  119. package/dist/assertion/impl/snapshot.d.ts +278 -0
  120. package/dist/assertion/impl/snapshot.d.ts.map +1 -0
  121. package/dist/assertion/impl/snapshot.js +273 -0
  122. package/dist/assertion/impl/snapshot.js.map +1 -0
  123. package/dist/assertion/impl/sync-basic.cjs +553 -0
  124. package/dist/assertion/impl/sync-basic.cjs.map +1 -0
  125. package/dist/assertion/impl/sync-basic.d.cts +528 -0
  126. package/dist/assertion/impl/sync-basic.d.cts.map +1 -0
  127. package/dist/assertion/impl/sync-basic.d.ts +528 -0
  128. package/dist/assertion/impl/sync-basic.d.ts.map +1 -0
  129. package/dist/assertion/impl/sync-basic.js +550 -0
  130. package/dist/assertion/impl/sync-basic.js.map +1 -0
  131. package/dist/assertion/impl/sync-collection.cjs +1424 -0
  132. package/dist/assertion/impl/sync-collection.cjs.map +1 -0
  133. package/dist/assertion/impl/sync-collection.d.cts +922 -0
  134. package/dist/assertion/impl/sync-collection.d.cts.map +1 -0
  135. package/dist/assertion/impl/sync-collection.d.ts +922 -0
  136. package/dist/assertion/impl/sync-collection.d.ts.map +1 -0
  137. package/dist/assertion/impl/sync-collection.js +1418 -0
  138. package/dist/assertion/impl/sync-collection.js.map +1 -0
  139. package/dist/assertion/impl/sync-date.cjs +341 -0
  140. package/dist/assertion/impl/sync-date.cjs.map +1 -0
  141. package/dist/assertion/impl/sync-date.d.cts +209 -0
  142. package/dist/assertion/impl/sync-date.d.cts.map +1 -0
  143. package/dist/assertion/impl/sync-date.d.ts +209 -0
  144. package/dist/assertion/impl/sync-date.d.ts.map +1 -0
  145. package/dist/assertion/impl/sync-date.js +338 -0
  146. package/dist/assertion/impl/sync-date.js.map +1 -0
  147. package/dist/assertion/impl/sync-esoteric.cjs +214 -0
  148. package/dist/assertion/impl/sync-esoteric.cjs.map +1 -0
  149. package/dist/assertion/impl/sync-esoteric.d.cts +191 -0
  150. package/dist/assertion/impl/sync-esoteric.d.cts.map +1 -0
  151. package/dist/assertion/impl/sync-esoteric.d.ts +191 -0
  152. package/dist/assertion/impl/sync-esoteric.d.ts.map +1 -0
  153. package/dist/assertion/impl/sync-esoteric.js +211 -0
  154. package/dist/assertion/impl/sync-esoteric.js.map +1 -0
  155. package/dist/assertion/impl/sync-iterable.cjs +512 -0
  156. package/dist/assertion/impl/sync-iterable.cjs.map +1 -0
  157. package/dist/assertion/impl/sync-iterable.d.cts +334 -0
  158. package/dist/assertion/impl/sync-iterable.d.cts.map +1 -0
  159. package/dist/assertion/impl/sync-iterable.d.ts +334 -0
  160. package/dist/assertion/impl/sync-iterable.d.ts.map +1 -0
  161. package/dist/assertion/impl/sync-iterable.js +509 -0
  162. package/dist/assertion/impl/sync-iterable.js.map +1 -0
  163. package/dist/assertion/impl/sync-parametric.cjs +805 -0
  164. package/dist/assertion/impl/sync-parametric.cjs.map +1 -0
  165. package/dist/assertion/impl/sync-parametric.d.cts +560 -0
  166. package/dist/assertion/impl/sync-parametric.d.cts.map +1 -0
  167. package/dist/assertion/impl/sync-parametric.d.ts +560 -0
  168. package/dist/assertion/impl/sync-parametric.d.ts.map +1 -0
  169. package/dist/assertion/impl/sync-parametric.js +802 -0
  170. package/dist/assertion/impl/sync-parametric.js.map +1 -0
  171. package/dist/assertion/impl/sync.cjs +229 -0
  172. package/dist/assertion/impl/sync.cjs.map +1 -0
  173. package/dist/assertion/impl/sync.d.cts +536 -0
  174. package/dist/assertion/impl/sync.d.cts.map +1 -0
  175. package/dist/assertion/impl/sync.d.ts +536 -0
  176. package/dist/assertion/impl/sync.d.ts.map +1 -0
  177. package/dist/assertion/impl/sync.js +212 -0
  178. package/dist/assertion/impl/sync.js.map +1 -0
  179. package/dist/assertion/index.cjs +38 -0
  180. package/dist/assertion/index.cjs.map +1 -0
  181. package/dist/assertion/index.d.cts +18 -0
  182. package/dist/assertion/index.d.cts.map +1 -0
  183. package/dist/assertion/index.d.ts +18 -0
  184. package/dist/assertion/index.d.ts.map +1 -0
  185. package/dist/assertion/index.js +17 -0
  186. package/dist/assertion/index.js.map +1 -0
  187. package/dist/assertion/slotify.cjs +165 -0
  188. package/dist/assertion/slotify.cjs.map +1 -0
  189. package/dist/assertion/slotify.d.cts +11 -0
  190. package/dist/assertion/slotify.d.cts.map +1 -0
  191. package/dist/assertion/slotify.d.ts +11 -0
  192. package/dist/assertion/slotify.d.ts.map +1 -0
  193. package/dist/assertion/slotify.js +161 -0
  194. package/dist/assertion/slotify.js.map +1 -0
  195. package/dist/bootstrap.cjs +43 -0
  196. package/dist/bootstrap.cjs.map +1 -0
  197. package/dist/bootstrap.d.cts +27 -0
  198. package/dist/bootstrap.d.cts.map +1 -0
  199. package/dist/bootstrap.d.ts +27 -0
  200. package/dist/bootstrap.d.ts.map +1 -0
  201. package/dist/bootstrap.js +40 -0
  202. package/dist/bootstrap.js.map +1 -0
  203. package/dist/constant.cjs +82 -0
  204. package/dist/constant.cjs.map +1 -0
  205. package/dist/constant.d.cts +69 -0
  206. package/dist/constant.d.cts.map +1 -0
  207. package/dist/constant.d.ts +69 -0
  208. package/dist/constant.d.ts.map +1 -0
  209. package/dist/constant.js +79 -0
  210. package/dist/constant.js.map +1 -0
  211. package/dist/diff.cjs +340 -0
  212. package/dist/diff.cjs.map +1 -0
  213. package/dist/diff.d.cts +51 -0
  214. package/dist/diff.d.cts.map +1 -0
  215. package/dist/diff.d.ts +51 -0
  216. package/dist/diff.d.ts.map +1 -0
  217. package/dist/diff.js +334 -0
  218. package/dist/diff.js.map +1 -0
  219. package/dist/error.cjs +194 -0
  220. package/dist/error.cjs.map +1 -0
  221. package/dist/error.d.cts +212 -0
  222. package/dist/error.d.cts.map +1 -0
  223. package/dist/error.d.ts +212 -0
  224. package/dist/error.d.ts.map +1 -0
  225. package/dist/error.js +181 -0
  226. package/dist/error.js.map +1 -0
  227. package/dist/expect.cjs +587 -0
  228. package/dist/expect.cjs.map +1 -0
  229. package/dist/expect.d.cts +138 -0
  230. package/dist/expect.d.cts.map +1 -0
  231. package/dist/expect.d.ts +138 -0
  232. package/dist/expect.d.ts.map +1 -0
  233. package/dist/expect.js +582 -0
  234. package/dist/expect.js.map +1 -0
  235. package/dist/guards.cjs +291 -0
  236. package/dist/guards.cjs.map +1 -0
  237. package/dist/guards.d.cts +225 -0
  238. package/dist/guards.d.cts.map +1 -0
  239. package/dist/guards.d.ts +225 -0
  240. package/dist/guards.d.ts.map +1 -0
  241. package/dist/guards.js +273 -0
  242. package/dist/guards.js.map +1 -0
  243. package/dist/index.cjs +111 -0
  244. package/dist/index.cjs.map +1 -0
  245. package/dist/index.d.cts +460 -0
  246. package/dist/index.d.cts.map +1 -0
  247. package/dist/index.d.ts +460 -0
  248. package/dist/index.d.ts.map +1 -0
  249. package/dist/index.js +71 -0
  250. package/dist/index.js.map +1 -0
  251. package/dist/internal-schema.cjs +234 -0
  252. package/dist/internal-schema.cjs.map +1 -0
  253. package/dist/internal-schema.d.cts +8 -0
  254. package/dist/internal-schema.d.cts.map +1 -0
  255. package/dist/internal-schema.d.ts +8 -0
  256. package/dist/internal-schema.d.ts.map +1 -0
  257. package/dist/internal-schema.js +229 -0
  258. package/dist/internal-schema.js.map +1 -0
  259. package/dist/metadata.cjs +57 -0
  260. package/dist/metadata.cjs.map +1 -0
  261. package/dist/metadata.d.cts +27 -0
  262. package/dist/metadata.d.cts.map +1 -0
  263. package/dist/metadata.d.ts +27 -0
  264. package/dist/metadata.d.ts.map +1 -0
  265. package/dist/metadata.js +54 -0
  266. package/dist/metadata.js.map +1 -0
  267. package/dist/schema.cjs +1522 -0
  268. package/dist/schema.cjs.map +1 -0
  269. package/dist/schema.d.cts +1196 -0
  270. package/dist/schema.d.cts.map +1 -0
  271. package/dist/schema.d.ts +1196 -0
  272. package/dist/schema.d.ts.map +1 -0
  273. package/dist/schema.js +1516 -0
  274. package/dist/schema.js.map +1 -0
  275. package/dist/snapshot/adapter.cjs +29 -0
  276. package/dist/snapshot/adapter.cjs.map +1 -0
  277. package/dist/snapshot/adapter.d.cts +258 -0
  278. package/dist/snapshot/adapter.d.cts.map +1 -0
  279. package/dist/snapshot/adapter.d.ts +258 -0
  280. package/dist/snapshot/adapter.d.ts.map +1 -0
  281. package/dist/snapshot/adapter.js +25 -0
  282. package/dist/snapshot/adapter.js.map +1 -0
  283. package/dist/snapshot/adapters/fallback.cjs +452 -0
  284. package/dist/snapshot/adapters/fallback.cjs.map +1 -0
  285. package/dist/snapshot/adapters/fallback.d.cts +185 -0
  286. package/dist/snapshot/adapters/fallback.d.cts.map +1 -0
  287. package/dist/snapshot/adapters/fallback.d.ts +185 -0
  288. package/dist/snapshot/adapters/fallback.d.ts.map +1 -0
  289. package/dist/snapshot/adapters/fallback.js +445 -0
  290. package/dist/snapshot/adapters/fallback.js.map +1 -0
  291. package/dist/snapshot/adapters/node-test.cjs +297 -0
  292. package/dist/snapshot/adapters/node-test.cjs.map +1 -0
  293. package/dist/snapshot/adapters/node-test.d.cts +131 -0
  294. package/dist/snapshot/adapters/node-test.d.cts.map +1 -0
  295. package/dist/snapshot/adapters/node-test.d.ts +131 -0
  296. package/dist/snapshot/adapters/node-test.d.ts.map +1 -0
  297. package/dist/snapshot/adapters/node-test.js +293 -0
  298. package/dist/snapshot/adapters/node-test.js.map +1 -0
  299. package/dist/snapshot/index.cjs +61 -0
  300. package/dist/snapshot/index.cjs.map +1 -0
  301. package/dist/snapshot/index.d.cts +40 -0
  302. package/dist/snapshot/index.d.cts.map +1 -0
  303. package/dist/snapshot/index.d.ts +40 -0
  304. package/dist/snapshot/index.d.ts.map +1 -0
  305. package/dist/snapshot/index.js +44 -0
  306. package/dist/snapshot/index.js.map +1 -0
  307. package/dist/snapshot/node-version.cjs +49 -0
  308. package/dist/snapshot/node-version.cjs.map +1 -0
  309. package/dist/snapshot/node-version.d.cts +34 -0
  310. package/dist/snapshot/node-version.d.cts.map +1 -0
  311. package/dist/snapshot/node-version.d.ts +34 -0
  312. package/dist/snapshot/node-version.d.ts.map +1 -0
  313. package/dist/snapshot/node-version.js +44 -0
  314. package/dist/snapshot/node-version.js.map +1 -0
  315. package/dist/snapshot/select-adapter.cjs +170 -0
  316. package/dist/snapshot/select-adapter.cjs.map +1 -0
  317. package/dist/snapshot/select-adapter.d.cts +128 -0
  318. package/dist/snapshot/select-adapter.d.cts.map +1 -0
  319. package/dist/snapshot/select-adapter.d.ts +128 -0
  320. package/dist/snapshot/select-adapter.d.ts.map +1 -0
  321. package/dist/snapshot/select-adapter.js +164 -0
  322. package/dist/snapshot/select-adapter.js.map +1 -0
  323. package/dist/snapshot/serializer.cjs +245 -0
  324. package/dist/snapshot/serializer.cjs.map +1 -0
  325. package/dist/snapshot/serializer.d.cts +126 -0
  326. package/dist/snapshot/serializer.d.cts.map +1 -0
  327. package/dist/snapshot/serializer.d.ts +126 -0
  328. package/dist/snapshot/serializer.d.ts.map +1 -0
  329. package/dist/snapshot/serializer.js +237 -0
  330. package/dist/snapshot/serializer.js.map +1 -0
  331. package/dist/standard-schema.cjs +13 -0
  332. package/dist/standard-schema.cjs.map +1 -0
  333. package/dist/standard-schema.d.cts +192 -0
  334. package/dist/standard-schema.d.cts.map +1 -0
  335. package/dist/standard-schema.d.ts +192 -0
  336. package/dist/standard-schema.d.ts.map +1 -0
  337. package/dist/standard-schema.js +12 -0
  338. package/dist/standard-schema.js.map +1 -0
  339. package/dist/types.cjs +22 -0
  340. package/dist/types.cjs.map +1 -0
  341. package/dist/types.d.cts +756 -0
  342. package/dist/types.d.cts.map +1 -0
  343. package/dist/types.d.ts +756 -0
  344. package/dist/types.d.ts.map +1 -0
  345. package/dist/types.js +21 -0
  346. package/dist/types.js.map +1 -0
  347. package/dist/use.cjs +240 -0
  348. package/dist/use.cjs.map +1 -0
  349. package/dist/use.d.cts +8 -0
  350. package/dist/use.d.cts.map +1 -0
  351. package/dist/use.d.ts +8 -0
  352. package/dist/use.d.ts.map +1 -0
  353. package/dist/use.js +236 -0
  354. package/dist/use.js.map +1 -0
  355. package/dist/util.cjs +255 -0
  356. package/dist/util.cjs.map +1 -0
  357. package/dist/util.d.cts +141 -0
  358. package/dist/util.d.cts.map +1 -0
  359. package/dist/util.d.ts +141 -0
  360. package/dist/util.d.ts.map +1 -0
  361. package/dist/util.js +234 -0
  362. package/dist/util.js.map +1 -0
  363. package/dist/value-to-schema.cjs +537 -0
  364. package/dist/value-to-schema.cjs.map +1 -0
  365. package/dist/value-to-schema.d.cts +144 -0
  366. package/dist/value-to-schema.d.cts.map +1 -0
  367. package/dist/value-to-schema.d.ts +144 -0
  368. package/dist/value-to-schema.d.ts.map +1 -0
  369. package/dist/value-to-schema.js +533 -0
  370. package/dist/value-to-schema.js.map +1 -0
  371. package/package.json +24 -21
  372. package/src/assertion/assertion-sync.ts +1 -1
  373. package/src/assertion/assertion-types.ts +4 -8
  374. package/src/assertion/assertion.ts +12 -7
  375. package/src/assertion/format-assertion-failure.ts +2 -0
  376. package/src/assertion/impl/assertion-util.ts +1 -2
  377. package/src/assertion/impl/iteration-util.ts +3 -5
  378. package/src/assertion/impl/sync-collection.ts +633 -7
  379. package/src/assertion/impl/sync.ts +27 -0
  380. package/src/error.ts +13 -22
  381. package/src/expect.ts +1 -1
  382. package/src/guards.ts +8 -14
  383. package/src/internal-schema.ts +4 -8
  384. package/src/metadata.ts +1 -2
  385. package/src/snapshot/adapter.ts +2 -3
  386. package/src/snapshot/adapters/fallback.ts +2 -3
  387. package/src/snapshot/adapters/node-test.ts +14 -20
  388. package/src/snapshot/select-adapter.ts +3 -3
  389. package/src/snapshot/serializer.ts +2 -3
  390. package/src/types.ts +2 -162
@@ -0,0 +1,587 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createExpectAsyncFunction = createExpectAsyncFunction;
4
+ exports.createExpectSyncFunction = createExpectSyncFunction;
5
+ exports.createBaseExpect = createBaseExpect;
6
+ const obug_1 = require("obug");
7
+ const util_1 = require("util");
8
+ const create_js_1 = require("./assertion/create.cjs");
9
+ const error_js_1 = require("./error.cjs");
10
+ const guards_js_1 = require("./guards.cjs");
11
+ const use_js_1 = require("./use.cjs");
12
+ const debug = (0, obug_1.createDebug)('bupkis:expect');
13
+ /**
14
+ * Implementation function that creates an asynchronous expect function with
15
+ * optional parent inheritance.
16
+ *
17
+ * This is the concrete implementation that handles both overload cases for
18
+ * Promise-based assertions. It creates an expectAsync function that uses a
19
+ * two-phase matching algorithm: first seeking exact phrase matches for optimal
20
+ * performance, then falling back to partial matches if needed. The function
21
+ * processes negation keywords, combines parent assertions with new ones, and
22
+ * ensures all operations are properly awaited.
23
+ *
24
+ * The matching algorithm prioritizes exact matches to minimize performance
25
+ * overhead, but provides flexibility through partial matching when exact
26
+ * phrases don't align. This enables natural language flexibility while
27
+ * maintaining execution speed for common async assertion patterns.
28
+ *
29
+ * @remarks
30
+ * The function performs async assertion matching in the following order:
31
+ *
32
+ * 1. Awaits `Promise.resolve()` to ensure the function is always asynchronous
33
+ * 2. Processes negation keywords ('not', 'to not') to determine assertion mode
34
+ * 3. Combines parent assertions (if provided) with new assertions in execution
35
+ * order
36
+ * 4. Attempts to parse arguments against each assertion's expected phrase pattern
37
+ * using `parseValuesAsync`
38
+ * 5. Prioritizes exact phrase matches over partial matches for performance
39
+ * 6. Executes the first successful match using {@link executeAsync} or throws an
40
+ * error if none found
41
+ *
42
+ * Performance considerations: The function loops through all available
43
+ * assertions for each call, but uses early termination when exact matches are
44
+ * found. For performance-critical code, consider using assertion functions with
45
+ * fewer total assertions or more specific phrase patterns to reduce matching
46
+ * overhead.
47
+ *
48
+ * All assertion execution is properly awaited to handle Promise-based
49
+ * validation logic, error handling, and negation scenarios in asynchronous
50
+ * contexts.
51
+ * @example
52
+ *
53
+ * ```typescript
54
+ * // Used internally by both public overloads
55
+ * const expectAsync1 = createExpectAsyncFunction(assertions); // No parent
56
+ * const expectAsync2 = createExpectAsyncFunction(assertions, parent); // With parent
57
+ * ```
58
+ *
59
+ * @param assertions - Array of asynchronous assertion objects to make available
60
+ * @param expect - Optional parent expectAsync function to inherit assertions
61
+ * from
62
+ * @returns Asynchronous expect function that processes natural language
63
+ * assertions with Promise support
64
+ * @throws {@link AssertionError} When an assertion fails in normal
65
+ * (non-negated) mode
66
+ * @throws {@link NegatedAssertionError} When a negated assertion fails (e.g.,
67
+ * `await expectAsync(promise, 'not to resolve')`)
68
+ * @throws {Error} When no matching assertion can be found for the provided
69
+ * arguments
70
+ * @internal This is the concrete implementation used by the public overloads
71
+ * @see {@link createExpectSyncFunction} for creating synchronous expect functions
72
+ * @see {@link createAsyncAssertion} for creating individual async assertion objects
73
+ * @see {@link ExpectAsync} for the main expectAsync interface
74
+ */
75
+ function createExpectAsyncFunction(assertions, expect) {
76
+ // Combine all assertions once at creation time
77
+ const allAssertions = [
78
+ ...(expect?.assertions ?? []),
79
+ ...assertions,
80
+ ];
81
+ // Build phrase index for fast dispatch
82
+ const phraseIndex = buildPhraseIndex(allAssertions);
83
+ debug('ℹ Creating expectAsync function with %d new assertions and %d existing assertions (%d total, %d indexed phrases)', assertions.length, expect?.assertions.length ?? 0, allAssertions.length, phraseIndex.size);
84
+ /**
85
+ * @function
86
+ */
87
+ const expectAsyncFunction = async (...args) => {
88
+ await Promise.resolve();
89
+ const argsMatrix = conjunctify(args);
90
+ // First, try all conjunctified argument sets
91
+ let foundCount = 0;
92
+ for (const args of argsMatrix) {
93
+ const { isNegated, processedArgs } = maybeProcessNegation(args);
94
+ const candidates = [];
95
+ // Use phrase index for O(1) candidate lookup, fall back to full scan
96
+ const assertionsToCheck = getCandidateAssertions(processedArgs, phraseIndex, allAssertions);
97
+ for (const assertion of assertionsToCheck) {
98
+ const parseResult = await assertion.parseValuesAsync(processedArgs);
99
+ const { exactMatch, parsedValues, success } = parseResult;
100
+ if (success) {
101
+ if (exactMatch) {
102
+ foundCount++;
103
+ await executeAsync(assertion, parsedValues, [...args], expectAsyncFunction, isNegated, parseResult);
104
+ break;
105
+ }
106
+ candidates.push({ assertion, parseResult });
107
+ }
108
+ }
109
+ if (candidates.length) {
110
+ const { assertion, parseResult } = candidates[0];
111
+ foundCount++;
112
+ await executeAsync(assertion,
113
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
114
+ parseResult.parsedValues, [...args], expectAsyncFunction, isNegated, parseResult);
115
+ }
116
+ }
117
+ if (foundCount >= argsMatrix.length) {
118
+ return;
119
+ }
120
+ // Fallback: if all conjunctified attempts failed and we actually split on "and",
121
+ // try different permutations of rejoining the split parts
122
+ if (argsMatrix.length > 1) {
123
+ const rejoinPermutations = generateRejoinPermutations(argsMatrix, args);
124
+ for (const permutation of rejoinPermutations) {
125
+ const { isNegated, processedArgs } = maybeProcessNegation(permutation);
126
+ const candidates = [];
127
+ // Use phrase index for O(1) candidate lookup, fall back to full scan
128
+ const assertionsToCheck = getCandidateAssertions(processedArgs, phraseIndex, allAssertions);
129
+ for (const assertion of assertionsToCheck) {
130
+ const parseResult = await assertion.parseValuesAsync(processedArgs);
131
+ const { exactMatch, parsedValues, success } = parseResult;
132
+ if (success) {
133
+ if (exactMatch) {
134
+ await executeAsync(assertion, parsedValues, [...permutation], expectAsyncFunction, isNegated, parseResult);
135
+ return;
136
+ }
137
+ candidates.push({ assertion, parseResult });
138
+ }
139
+ }
140
+ if (candidates.length) {
141
+ const { assertion, parseResult } = candidates[0];
142
+ await executeAsync(assertion,
143
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
144
+ parseResult.parsedValues, [...permutation], expectAsyncFunction, isNegated, parseResult);
145
+ return;
146
+ }
147
+ }
148
+ }
149
+ throwInvalidParametersError(args);
150
+ };
151
+ return expectAsyncFunction;
152
+ }
153
+ /**
154
+ * Implementation function that creates a synchronous expect function with
155
+ * optional parent inheritance.
156
+ *
157
+ * This is the concrete implementation that handles both overload cases. It
158
+ * creates an expect function that uses a two-phase matching algorithm: first
159
+ * seeking exact phrase matches for optimal performance, then falling back to
160
+ * partial matches if needed. The function processes negation keywords and
161
+ * combines parent assertions with new ones.
162
+ *
163
+ * The matching algorithm prioritizes exact matches to minimize performance
164
+ * overhead, but provides flexibility through partial matching when exact
165
+ * phrases don't align. This enables natural language flexibility while
166
+ * maintaining execution speed for common assertion patterns.
167
+ *
168
+ * @remarks
169
+ * The function performs assertion matching in the following order:
170
+ *
171
+ * 1. Processes negation keywords ('not', 'to not') to determine assertion mode
172
+ * 2. Combines parent assertions (if provided) with new assertions in execution
173
+ * order
174
+ * 3. Attempts to parse arguments against each assertion's expected phrase pattern
175
+ * 4. Prioritizes exact phrase matches over partial matches for performance
176
+ * 5. Executes the first successful match or throws an error if none found
177
+ *
178
+ * Performance considerations: The function loops through all available
179
+ * assertions for each call, but uses early termination when exact matches are
180
+ * found. For performance-critical code, consider using assertion functions with
181
+ * fewer total assertions or more specific phrase patterns to reduce matching
182
+ * overhead.
183
+ * @example
184
+ *
185
+ * ```typescript
186
+ * // Used internally by both public overloads
187
+ * const expect1 = createExpectSyncFunction(assertions); // No parent
188
+ * const expect2 = createExpectSyncFunction(assertions, parent); // With parent
189
+ * ```
190
+ *
191
+ * @param assertions - Array of synchronous assertion objects to make available
192
+ * @param expect - Optional parent expect function to inherit assertions from
193
+ * @returns Synchronous expect function that processes natural language
194
+ * assertions
195
+ * @throws {@link AssertionError} When an assertion fails in normal
196
+ * (non-negated) mode
197
+ * @throws {@link NegatedAssertionError} When a negated assertion fails (e.g.,
198
+ * `expect(42, 'not to be a number')`)
199
+ * @throws {Error} When no matching assertion can be found for the provided
200
+ * arguments
201
+ * @internal This is the concrete implementation used by the public overloads
202
+ * @see {@link createExpectAsyncFunction} for creating asynchronous expect functions
203
+ * @see {@link createAssertion} for creating individual assertion objects
204
+ * @see {@link Expect} for the main expect interface
205
+ */
206
+ function createExpectSyncFunction(assertions, expect) {
207
+ // Combine all assertions once at creation time
208
+ const allAssertions = [
209
+ ...(expect?.assertions ?? []),
210
+ ...assertions,
211
+ ];
212
+ // Build phrase index for fast dispatch
213
+ const phraseIndex = buildPhraseIndex(allAssertions);
214
+ debug('ℹ Creating expect function with %d new assertions and %d existing assertions (%d total, %d indexed phrases)', assertions.length, expect?.assertions.length ?? 0, allAssertions.length, phraseIndex.size);
215
+ /**
216
+ * @function
217
+ */
218
+ const expectFunction = (...args) => {
219
+ const argsMatrix = conjunctify(args);
220
+ // First, try all conjunctified argument sets
221
+ let foundCount = 0;
222
+ for (const args of argsMatrix) {
223
+ const { isNegated, processedArgs } = maybeProcessNegation(args);
224
+ const candidates = [];
225
+ // Use phrase index for O(1) candidate lookup, fall back to full scan
226
+ const assertionsToCheck = getCandidateAssertions(processedArgs, phraseIndex, allAssertions);
227
+ for (const assertion of assertionsToCheck) {
228
+ const parseResult = assertion.parseValues(processedArgs);
229
+ const { exactMatch, parsedValues, success } = parseResult;
230
+ if (success) {
231
+ if (exactMatch) {
232
+ foundCount++;
233
+ execute(assertion, parsedValues, [...args], expectFunction, isNegated, parseResult);
234
+ break;
235
+ }
236
+ candidates.push({ assertion, parseResult });
237
+ }
238
+ }
239
+ if (candidates.length) {
240
+ const { assertion, parseResult } = candidates[0];
241
+ foundCount++;
242
+ execute(assertion,
243
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
244
+ parseResult.parsedValues, [...args], expectFunction, isNegated, parseResult);
245
+ }
246
+ }
247
+ if (foundCount >= argsMatrix.length) {
248
+ return;
249
+ }
250
+ // Fallback: if all conjunctified attempts failed and we actually split on "and",
251
+ // try different permutations of rejoining the split parts
252
+ if (argsMatrix.length > 1) {
253
+ const rejoinPermutations = generateRejoinPermutations(argsMatrix, args);
254
+ for (const permutation of rejoinPermutations) {
255
+ const { isNegated, processedArgs } = maybeProcessNegation(permutation);
256
+ const candidates = [];
257
+ // Use phrase index for O(1) candidate lookup, fall back to full scan
258
+ const assertionsToCheck = getCandidateAssertions(processedArgs, phraseIndex, allAssertions);
259
+ for (const assertion of assertionsToCheck) {
260
+ const parseResult = assertion.parseValues(processedArgs);
261
+ const { exactMatch, parsedValues, success } = parseResult;
262
+ if (success) {
263
+ if (exactMatch) {
264
+ execute(assertion, parsedValues, [...permutation], expectFunction, isNegated, parseResult);
265
+ return;
266
+ }
267
+ candidates.push({ assertion, parseResult });
268
+ }
269
+ }
270
+ if (candidates.length) {
271
+ const { assertion, parseResult } = candidates[0];
272
+ execute(assertion,
273
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
274
+ parseResult.parsedValues, [...permutation], expectFunction, isNegated, parseResult);
275
+ return;
276
+ }
277
+ }
278
+ }
279
+ throwInvalidParametersError(args);
280
+ };
281
+ return expectFunction;
282
+ }
283
+ /**
284
+ * Executes an assertion with optional negation logic.
285
+ *
286
+ * @privateRemarks
287
+ * This is here because `Assertion` doesn't know anything about negation and
288
+ * probably shouldn't.
289
+ * @function
290
+ * @param assertion - The assertion to execute
291
+ * @param parsedValues - Parsed values for the assertion
292
+ * @param args - Original arguments passed to expect
293
+ * @param stackStartFn - Function for stack trace management
294
+ * @param isNegated - Whether the assertion should be negated
295
+ */
296
+ const execute = (assertion, parsedValues, args, stackStartFn, isNegated, parseResult) => {
297
+ try {
298
+ assertion.execute(parsedValues, args, stackStartFn, parseResult);
299
+ }
300
+ catch (error) {
301
+ handleAssertionError(error, assertion, isNegated);
302
+ return;
303
+ }
304
+ if (isNegated) {
305
+ throwNegatedAssertionPassedError(assertion, stackStartFn);
306
+ }
307
+ };
308
+ /**
309
+ * Executes an assertion with optional negation logic (async version).
310
+ *
311
+ * @privateRemarks
312
+ * This is here because `Assertion` doesn't know anything about negation and
313
+ * probably shouldn't.
314
+ * @function
315
+ * @param assertion - The assertion to execute
316
+ * @param parsedValues - Parsed values for the assertion
317
+ * @param args - Original arguments passed to expectAsync
318
+ * @param stackStartFn - Function for stack trace management
319
+ * @param isNegated - Whether the assertion should be negated
320
+ */
321
+ const executeAsync = async (assertion, parsedValues, args, stackStartFn, isNegated, parseResult) => {
322
+ try {
323
+ await assertion.executeAsync(parsedValues, args, stackStartFn, parseResult);
324
+ }
325
+ catch (error) {
326
+ handleAssertionError(error, assertion, isNegated);
327
+ return;
328
+ }
329
+ if (isNegated) {
330
+ throwNegatedAssertionPassedError(assertion, stackStartFn);
331
+ }
332
+ };
333
+ /**
334
+ * Handles errors thrown during assertion execution.
335
+ *
336
+ * @function
337
+ * @param error - The error that was thrown
338
+ * @param assertion - The assertion that threw the error
339
+ * @param isNegated - Whether the assertion was negated
340
+ * @returns Void if error should be swallowed (negated assertion success)
341
+ * @throws The original error if it's an AssertionError (non-negated case)
342
+ * @throws AssertionImplementationError if error is unexpected
343
+ */
344
+ const handleAssertionError = (error, assertion, isNegated) => {
345
+ if (error_js_1.AssertionError.isAssertionError(error)) {
346
+ if (isNegated) {
347
+ return;
348
+ }
349
+ throw error;
350
+ }
351
+ if (error_js_1.AssertionImplementationError.isAssertionImplementationError(error)) {
352
+ throw error;
353
+ }
354
+ throw new error_js_1.AssertionImplementationError(`Assertion ${assertion} threw a non-AssertionError`, { cause: error });
355
+ };
356
+ /**
357
+ * Throws a NegatedAssertionError when a negated assertion unexpectedly passes.
358
+ *
359
+ * @function
360
+ * @param assertion - The assertion that passed
361
+ * @param stackStartFn - Function for stack trace management
362
+ */
363
+ const throwNegatedAssertionPassedError = (assertion, stackStartFn) => {
364
+ throw new error_js_1.NegatedAssertionError({
365
+ id: assertion.id,
366
+ message: `Expected assertion ${assertion} to fail (due to negation), but it passed`,
367
+ stackStartFn,
368
+ });
369
+ };
370
+ /**
371
+ * Processes negation keywords in the arguments and returns whether negation is
372
+ * requested along with arguments stripped of the leading negation (to enable
373
+ * assertion matching).
374
+ *
375
+ * @function
376
+ * @internal
377
+ */
378
+ const maybeProcessNegation = (args) => {
379
+ let isNegated = false;
380
+ let processedArgs = args;
381
+ // note: args[1] should always be a string
382
+ if (args.length >= 2 && (0, guards_js_1.isString)(args[1])) {
383
+ const { cleanedPhrase, isNegated: detected } = detectNegation(args[1]);
384
+ if (detected) {
385
+ isNegated = true;
386
+ processedArgs = [args[0], cleanedPhrase, ...args.slice(2)];
387
+ }
388
+ }
389
+ return { isNegated, processedArgs };
390
+ };
391
+ /**
392
+ * Given some args, create a matrix of args based on the presence of the
393
+ * conjunction operator ("and").
394
+ *
395
+ * If no "and" is present, returns the original args wrapped in an array.
396
+ *
397
+ * @function
398
+ */
399
+ const conjunctify = (args) => {
400
+ let argsMatrix = [args];
401
+ if (args.length >= 2) {
402
+ // partition args by the string "and"; there may be multiple "and"s
403
+ const andIndices = args
404
+ .map((arg, index) => (arg === 'and' ? index : -1))
405
+ .filter((index) => index !== -1);
406
+ if (andIndices.length > 0) {
407
+ const parts = [];
408
+ let lastIndex = 0;
409
+ for (const andIndex of andIndices) {
410
+ const partsArgs = lastIndex > 0
411
+ ? [args[0], ...args.slice(lastIndex, andIndex)]
412
+ : [...args.slice(lastIndex, andIndex)];
413
+ parts.push(partsArgs);
414
+ lastIndex = andIndex + 1;
415
+ }
416
+ const finalPartsArgs = [args[0], ...args.slice(lastIndex)];
417
+ parts.push(finalPartsArgs);
418
+ argsMatrix = parts;
419
+ }
420
+ }
421
+ return argsMatrix;
422
+ };
423
+ /**
424
+ * Generates all possible ways to rejoin args that were split on "and".
425
+ *
426
+ * This is used as a fallback when conjunctified attempts fail - we try
427
+ * different permutations of rejoining the split parts to handle assertions that
428
+ * use "and" as part of their phrase (e.g., "to be greater than X and less than
429
+ * Y").
430
+ *
431
+ * @function
432
+ * @param argsMatrix The matrix of split arguments
433
+ * @param originalArgs The original unsplit arguments
434
+ * @returns Array of permutations to try
435
+ * @internal
436
+ */
437
+ const generateRejoinPermutations = (argsMatrix, originalArgs) => {
438
+ const permutations = [];
439
+ for (let i = 0; i < argsMatrix.length - 1; i++) {
440
+ const rejoinedParts = [];
441
+ // Add parts before the join point
442
+ for (let j = 0; j < i; j++) {
443
+ rejoinedParts.push([...argsMatrix[j]]);
444
+ }
445
+ // Join the two parts at the split point
446
+ const leftPart = argsMatrix[i];
447
+ const rightPart = argsMatrix[i + 1];
448
+ const joinedPart = [...leftPart, 'and', ...rightPart.slice(1)];
449
+ rejoinedParts.push(joinedPart);
450
+ // Add parts after the join point
451
+ for (let j = i + 2; j < argsMatrix.length; j++) {
452
+ rejoinedParts.push([...argsMatrix[j]]);
453
+ }
454
+ if (rejoinedParts.length === 1) {
455
+ permutations.push(rejoinedParts[0]);
456
+ }
457
+ else {
458
+ for (const part of rejoinedParts) {
459
+ permutations.push(part);
460
+ }
461
+ }
462
+ }
463
+ // Also try the original unsplit arguments as the final permutation
464
+ permutations.push(originalArgs);
465
+ return permutations;
466
+ };
467
+ /**
468
+ * Builds a phrase-keyed index for fast assertion dispatch.
469
+ *
470
+ * Maps phrase literals to the assertions that use them, enabling O(1) lookup
471
+ * instead of O(n) iteration over all assertions during dispatch.
472
+ *
473
+ * @function
474
+ * @param assertions - Array of assertions to index
475
+ * @returns Map from phrase string to array of assertions using that phrase
476
+ */
477
+ const buildPhraseIndex = (assertions) => {
478
+ const index = new Map();
479
+ for (const assertion of assertions) {
480
+ const phrases = assertion.getIndexPhrases();
481
+ for (const phrase of phrases) {
482
+ const existing = index.get(phrase);
483
+ if (existing) {
484
+ existing.push(assertion);
485
+ }
486
+ else {
487
+ index.set(phrase, [assertion]);
488
+ }
489
+ }
490
+ }
491
+ return index;
492
+ };
493
+ /**
494
+ * Extracts the phrase from processed arguments for index lookup.
495
+ *
496
+ * Looks at position 1 (subject-first assertions) and position 0 (phrase-first).
497
+ * Returns the first string found, or undefined if no phrase is present.
498
+ *
499
+ * @function
500
+ * @param args - Processed arguments (after negation handling)
501
+ * @returns The phrase string if found, undefined otherwise
502
+ */
503
+ const extractPhraseFromArgs = (args) => {
504
+ // Most common: subject at 0, phrase at 1
505
+ if (args.length > 1 && (0, guards_js_1.isString)(args[1])) {
506
+ return args[1];
507
+ }
508
+ // Less common: phrase at 0
509
+ if (args.length > 0 && (0, guards_js_1.isString)(args[0])) {
510
+ return args[0];
511
+ }
512
+ return undefined;
513
+ };
514
+ /**
515
+ * Gets candidate assertions for dispatch using phrase index lookup.
516
+ *
517
+ * Extracts the phrase from processed arguments and looks it up in the phrase
518
+ * index for O(1) candidate retrieval. Falls back to the full assertion list if
519
+ * no phrase is found or the phrase isn't indexed.
520
+ *
521
+ * @function
522
+ * @param processedArgs - Arguments after negation processing
523
+ * @param phraseIndex - Map from phrase strings to assertion arrays
524
+ * @param allAssertions - Complete assertion list for fallback
525
+ * @returns Array of candidate assertions to check
526
+ */
527
+ const getCandidateAssertions = (processedArgs, phraseIndex, allAssertions) => {
528
+ const phrase = extractPhraseFromArgs(processedArgs);
529
+ return ((phrase !== undefined ? phraseIndex.get(phrase) : undefined) ??
530
+ allAssertions);
531
+ };
532
+ /**
533
+ * Throws an error indicating that no valid assertion could be found for the
534
+ * provided arguments.
535
+ *
536
+ * @function
537
+ * @param args The arguments that were passed to the expect function
538
+ * @internal
539
+ */
540
+ const throwInvalidParametersError = (args) => {
541
+ const inspectedArgs = (0, util_1.inspect)(args, { depth: 1 });
542
+ debug('Invalid arguments. No assertion matched: %s', inspectedArgs);
543
+ throw new error_js_1.UnknownAssertionError(`Invalid arguments. No assertion matched: ${inspectedArgs}`, { args });
544
+ };
545
+ /**
546
+ * Detects if an assertion phrase starts with "not " and returns the cleaned
547
+ * phrase.
548
+ *
549
+ * @function
550
+ * @param phrase - The assertion phrase to check
551
+ * @returns Object with `isNegated` flag and `cleanedPhrase`
552
+ */
553
+ const detectNegation = (phrase) => {
554
+ if (phrase.startsWith('not ')) {
555
+ return {
556
+ cleanedPhrase: phrase.substring(4), // Remove "not "
557
+ isNegated: true,
558
+ };
559
+ }
560
+ return {
561
+ cleanedPhrase: phrase,
562
+ isNegated: false,
563
+ };
564
+ };
565
+ /**
566
+ * {@inheritDoc FailFn}
567
+ *
568
+ * @function
569
+ */
570
+ const fail = (reason) => {
571
+ throw new error_js_1.FailAssertionError({ message: reason });
572
+ };
573
+ /**
574
+ * Used by a {@link UseFn} to create base properties of {@link Expect} or
575
+ * {@link ExpectAsync}.
576
+ */
577
+ function createBaseExpect(syncAssertions, asyncAssertions, type) {
578
+ const assertions = type === 'sync' ? syncAssertions : asyncAssertions;
579
+ return {
580
+ assertions,
581
+ createAssertion: create_js_1.createAssertion,
582
+ createAsyncAssertion: create_js_1.createAsyncAssertion,
583
+ fail,
584
+ use: (0, use_js_1.createUse)(syncAssertions, asyncAssertions),
585
+ };
586
+ }
587
+ //# sourceMappingURL=expect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expect.js","sourceRoot":"","sources":["../src/expect.ts"],"names":[],"mappings":";;AA4KA,8DA6IC;AA8HD,4DA6IC;AA6YD,4CAYC;AA79BD,+BAAmC;AACnC,+BAA+B;AAgB/B,sDAA8E;AAC9E,0CAMoB;AACpB,4CAAuC;AAYvC,sCAAqC;AAErC,MAAM,KAAK,GAAG,IAAA,kBAAW,EAAC,eAAe,CAAC,CAAC;AAuE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,SAAgB,yBAAyB,CAGvC,UAAa,EAAE,MAAU;IACzB,+CAA+C;IAC/C,MAAM,aAAa,GAAwB;QACzC,GAAG,CAAC,MAAM,EAAE,UAAU,IAAI,EAAE,CAAC;QAC7B,GAAG,UAAU;KACd,CAA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