bupkis 0.6.0 → 0.8.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 (189) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +33 -30
  3. package/dist/commonjs/assertion/assertion-async.d.ts.map +1 -1
  4. package/dist/commonjs/assertion/assertion-async.js +4 -11
  5. package/dist/commonjs/assertion/assertion-async.js.map +1 -1
  6. package/dist/commonjs/assertion/assertion-sync.d.ts.map +1 -1
  7. package/dist/commonjs/assertion/assertion-sync.js +3 -13
  8. package/dist/commonjs/assertion/assertion-sync.js.map +1 -1
  9. package/dist/commonjs/assertion/assertion.d.ts +0 -13
  10. package/dist/commonjs/assertion/assertion.d.ts.map +1 -1
  11. package/dist/commonjs/assertion/assertion.js +45 -30
  12. package/dist/commonjs/assertion/assertion.js.map +1 -1
  13. package/dist/commonjs/assertion/create.d.ts +2 -0
  14. package/dist/commonjs/assertion/create.d.ts.map +1 -1
  15. package/dist/commonjs/assertion/create.js +20 -16
  16. package/dist/commonjs/assertion/create.js.map +1 -1
  17. package/dist/commonjs/assertion/impl/assertion-util.d.ts +2 -0
  18. package/dist/commonjs/assertion/impl/assertion-util.d.ts.map +1 -1
  19. package/dist/commonjs/assertion/impl/assertion-util.js +13 -2
  20. package/dist/commonjs/assertion/impl/assertion-util.js.map +1 -1
  21. package/dist/commonjs/assertion/impl/async-parametric.d.ts +2 -2
  22. package/dist/commonjs/assertion/impl/async-parametric.d.ts.map +1 -1
  23. package/dist/commonjs/assertion/impl/async-parametric.js +5 -48
  24. package/dist/commonjs/assertion/impl/async-parametric.js.map +1 -1
  25. package/dist/commonjs/assertion/impl/async.d.ts +4 -4
  26. package/dist/commonjs/assertion/impl/sync-basic.d.ts.map +1 -1
  27. package/dist/commonjs/assertion/impl/sync-basic.js +2 -3
  28. package/dist/commonjs/assertion/impl/sync-basic.js.map +1 -1
  29. package/dist/commonjs/assertion/impl/sync-collection.d.ts.map +1 -1
  30. package/dist/commonjs/assertion/impl/sync-collection.js +25 -15
  31. package/dist/commonjs/assertion/impl/sync-collection.js.map +1 -1
  32. package/dist/commonjs/assertion/impl/sync-esoteric.d.ts +1 -5
  33. package/dist/commonjs/assertion/impl/sync-esoteric.d.ts.map +1 -1
  34. package/dist/commonjs/assertion/impl/sync-esoteric.js +11 -13
  35. package/dist/commonjs/assertion/impl/sync-esoteric.js.map +1 -1
  36. package/dist/commonjs/assertion/impl/sync-parametric.d.ts +2 -2
  37. package/dist/commonjs/assertion/impl/sync-parametric.d.ts.map +1 -1
  38. package/dist/commonjs/assertion/impl/sync-parametric.js +18 -7
  39. package/dist/commonjs/assertion/impl/sync-parametric.js.map +1 -1
  40. package/dist/commonjs/assertion/impl/sync.d.ts +6 -14
  41. package/dist/commonjs/assertion/impl/sync.d.ts.map +1 -1
  42. package/dist/commonjs/assertion/slotify.d.ts +1 -0
  43. package/dist/commonjs/assertion/slotify.d.ts.map +1 -1
  44. package/dist/commonjs/assertion/slotify.js +5 -3
  45. package/dist/commonjs/assertion/slotify.js.map +1 -1
  46. package/dist/commonjs/bootstrap.d.ts +5 -9
  47. package/dist/commonjs/bootstrap.d.ts.map +1 -1
  48. package/dist/commonjs/bootstrap.js +1 -0
  49. package/dist/commonjs/bootstrap.js.map +1 -1
  50. package/dist/commonjs/constant.js +7 -1
  51. package/dist/commonjs/constant.js.map +1 -1
  52. package/dist/commonjs/diff.d.ts +51 -0
  53. package/dist/commonjs/diff.d.ts.map +1 -0
  54. package/dist/commonjs/diff.js +279 -0
  55. package/dist/commonjs/diff.js.map +1 -0
  56. package/dist/commonjs/error.d.ts +151 -0
  57. package/dist/commonjs/error.d.ts.map +1 -1
  58. package/dist/commonjs/error.js +133 -7
  59. package/dist/commonjs/error.js.map +1 -1
  60. package/dist/commonjs/expect.d.ts +4 -2
  61. package/dist/commonjs/expect.d.ts.map +1 -1
  62. package/dist/commonjs/expect.js +32 -6
  63. package/dist/commonjs/expect.js.map +1 -1
  64. package/dist/commonjs/guards.d.ts +12 -8
  65. package/dist/commonjs/guards.d.ts.map +1 -1
  66. package/dist/commonjs/guards.js +28 -15
  67. package/dist/commonjs/guards.js.map +1 -1
  68. package/dist/commonjs/index.d.ts +7 -10
  69. package/dist/commonjs/index.d.ts.map +1 -1
  70. package/dist/commonjs/index.js +6 -3
  71. package/dist/commonjs/index.js.map +1 -1
  72. package/dist/commonjs/schema.d.ts.map +1 -1
  73. package/dist/commonjs/schema.js +3 -2
  74. package/dist/commonjs/schema.js.map +1 -1
  75. package/dist/commonjs/use.js +22 -8
  76. package/dist/commonjs/use.js.map +1 -1
  77. package/dist/commonjs/util.d.ts +1 -0
  78. package/dist/commonjs/util.d.ts.map +1 -1
  79. package/dist/commonjs/util.js +14 -10
  80. package/dist/commonjs/util.js.map +1 -1
  81. package/dist/commonjs/value-to-schema.d.ts +1 -0
  82. package/dist/commonjs/value-to-schema.d.ts.map +1 -1
  83. package/dist/commonjs/value-to-schema.js +20 -12
  84. package/dist/commonjs/value-to-schema.js.map +1 -1
  85. package/dist/esm/assertion/assertion-async.d.ts.map +1 -1
  86. package/dist/esm/assertion/assertion-async.js +5 -12
  87. package/dist/esm/assertion/assertion-async.js.map +1 -1
  88. package/dist/esm/assertion/assertion-sync.d.ts.map +1 -1
  89. package/dist/esm/assertion/assertion-sync.js +7 -17
  90. package/dist/esm/assertion/assertion-sync.js.map +1 -1
  91. package/dist/esm/assertion/assertion.d.ts +0 -13
  92. package/dist/esm/assertion/assertion.d.ts.map +1 -1
  93. package/dist/esm/assertion/assertion.js +48 -33
  94. package/dist/esm/assertion/assertion.js.map +1 -1
  95. package/dist/esm/assertion/create.d.ts +2 -0
  96. package/dist/esm/assertion/create.d.ts.map +1 -1
  97. package/dist/esm/assertion/create.js +20 -16
  98. package/dist/esm/assertion/create.js.map +1 -1
  99. package/dist/esm/assertion/impl/assertion-util.d.ts +2 -0
  100. package/dist/esm/assertion/impl/assertion-util.d.ts.map +1 -1
  101. package/dist/esm/assertion/impl/assertion-util.js +13 -2
  102. package/dist/esm/assertion/impl/assertion-util.js.map +1 -1
  103. package/dist/esm/assertion/impl/async-parametric.d.ts +2 -2
  104. package/dist/esm/assertion/impl/async-parametric.d.ts.map +1 -1
  105. package/dist/esm/assertion/impl/async-parametric.js +5 -48
  106. package/dist/esm/assertion/impl/async-parametric.js.map +1 -1
  107. package/dist/esm/assertion/impl/async.d.ts +4 -4
  108. package/dist/esm/assertion/impl/sync-basic.d.ts.map +1 -1
  109. package/dist/esm/assertion/impl/sync-basic.js +2 -3
  110. package/dist/esm/assertion/impl/sync-basic.js.map +1 -1
  111. package/dist/esm/assertion/impl/sync-collection.d.ts.map +1 -1
  112. package/dist/esm/assertion/impl/sync-collection.js +25 -15
  113. package/dist/esm/assertion/impl/sync-collection.js.map +1 -1
  114. package/dist/esm/assertion/impl/sync-esoteric.d.ts +1 -5
  115. package/dist/esm/assertion/impl/sync-esoteric.d.ts.map +1 -1
  116. package/dist/esm/assertion/impl/sync-esoteric.js +11 -13
  117. package/dist/esm/assertion/impl/sync-esoteric.js.map +1 -1
  118. package/dist/esm/assertion/impl/sync-parametric.d.ts +2 -2
  119. package/dist/esm/assertion/impl/sync-parametric.d.ts.map +1 -1
  120. package/dist/esm/assertion/impl/sync-parametric.js +18 -7
  121. package/dist/esm/assertion/impl/sync-parametric.js.map +1 -1
  122. package/dist/esm/assertion/impl/sync.d.ts +6 -14
  123. package/dist/esm/assertion/impl/sync.d.ts.map +1 -1
  124. package/dist/esm/assertion/slotify.d.ts +1 -0
  125. package/dist/esm/assertion/slotify.d.ts.map +1 -1
  126. package/dist/esm/assertion/slotify.js +5 -3
  127. package/dist/esm/assertion/slotify.js.map +1 -1
  128. package/dist/esm/bootstrap.d.ts +5 -9
  129. package/dist/esm/bootstrap.d.ts.map +1 -1
  130. package/dist/esm/bootstrap.js +1 -0
  131. package/dist/esm/bootstrap.js.map +1 -1
  132. package/dist/esm/constant.js +6 -0
  133. package/dist/esm/constant.js.map +1 -1
  134. package/dist/esm/diff.d.ts +51 -0
  135. package/dist/esm/diff.d.ts.map +1 -0
  136. package/dist/esm/diff.js +273 -0
  137. package/dist/esm/diff.js.map +1 -0
  138. package/dist/esm/error.d.ts +151 -0
  139. package/dist/esm/error.d.ts.map +1 -1
  140. package/dist/esm/error.js +126 -7
  141. package/dist/esm/error.js.map +1 -1
  142. package/dist/esm/expect.d.ts +4 -2
  143. package/dist/esm/expect.d.ts.map +1 -1
  144. package/dist/esm/expect.js +35 -9
  145. package/dist/esm/expect.js.map +1 -1
  146. package/dist/esm/guards.d.ts +12 -8
  147. package/dist/esm/guards.d.ts.map +1 -1
  148. package/dist/esm/guards.js +27 -13
  149. package/dist/esm/guards.js.map +1 -1
  150. package/dist/esm/index.d.ts +7 -10
  151. package/dist/esm/index.d.ts.map +1 -1
  152. package/dist/esm/index.js +2 -1
  153. package/dist/esm/index.js.map +1 -1
  154. package/dist/esm/schema.d.ts.map +1 -1
  155. package/dist/esm/schema.js +3 -2
  156. package/dist/esm/schema.js.map +1 -1
  157. package/dist/esm/use.js +19 -6
  158. package/dist/esm/use.js.map +1 -1
  159. package/dist/esm/util.d.ts +1 -0
  160. package/dist/esm/util.d.ts.map +1 -1
  161. package/dist/esm/util.js +14 -10
  162. package/dist/esm/util.js.map +1 -1
  163. package/dist/esm/value-to-schema.d.ts +1 -0
  164. package/dist/esm/value-to-schema.d.ts.map +1 -1
  165. package/dist/esm/value-to-schema.js +20 -12
  166. package/dist/esm/value-to-schema.js.map +1 -1
  167. package/package.json +38 -26
  168. package/src/assertion/assertion-async.ts +9 -18
  169. package/src/assertion/assertion-sync.ts +12 -24
  170. package/src/assertion/assertion.ts +54 -34
  171. package/src/assertion/create.ts +39 -20
  172. package/src/assertion/impl/assertion-util.ts +27 -16
  173. package/src/assertion/impl/async-parametric.ts +7 -49
  174. package/src/assertion/impl/sync-basic.ts +3 -3
  175. package/src/assertion/impl/sync-collection.ts +35 -15
  176. package/src/assertion/impl/sync-esoteric.ts +17 -13
  177. package/src/assertion/impl/sync-parametric.ts +24 -7
  178. package/src/assertion/slotify.ts +5 -3
  179. package/src/bootstrap.ts +1 -0
  180. package/src/constant.ts +7 -0
  181. package/src/diff.ts +343 -0
  182. package/src/error.ts +222 -6
  183. package/src/expect.ts +44 -10
  184. package/src/guards.ts +31 -16
  185. package/src/index.ts +2 -1
  186. package/src/schema.ts +4 -2
  187. package/src/use.ts +21 -7
  188. package/src/util.ts +15 -12
  189. package/src/value-to-schema.ts +21 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.0](https://github.com/boneskull/bupkis/compare/bupkis-v0.7.2...bupkis-v0.8.0) (2025-09-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * proper diffs ([ef29531](https://github.com/boneskull/bupkis/commit/ef295313cf5e8b5b0b0357098f4f7ee22414403d))
9
+
10
+ ## [0.7.2](https://github.com/boneskull/bupkis/compare/bupkis-v0.7.1...bupkis-v0.7.2) (2025-09-22)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **release:** revert change to publish action ([5342626](https://github.com/boneskull/bupkis/commit/5342626daa65b75994bd9681f356f24fef7a25ba))
16
+
17
+ ## [0.7.1](https://github.com/boneskull/bupkis/compare/bupkis-v0.7.0...bupkis-v0.7.1) (2025-09-22)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **release:** release 0.7.0 ([488f0dc](https://github.com/boneskull/bupkis/commit/488f0dc6f74a8c83fd97ec6ea1bd937bf2df0032))
23
+ * **release:** release 0.7.1 ([7505fb8](https://github.com/boneskull/bupkis/commit/7505fb810a22d0f433af6403c9ff3fa492279884))
24
+
25
+ ## [0.7.0](https://github.com/boneskull/bupkis/compare/bupkis-v0.7.0...bupkis-v0.7.0) (2025-09-22)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **release:** release 0.7.0 ([488f0dc](https://github.com/boneskull/bupkis/commit/488f0dc6f74a8c83fd97ec6ea1bd937bf2df0032))
31
+
32
+ ## [0.7.0](https://github.com/boneskull/bupkis/compare/bupkis-v0.6.0...bupkis-v0.7.0) (2025-09-22)
33
+
34
+
35
+ ### Features
36
+
37
+ * add proper errors, codes ([1f3b149](https://github.com/boneskull/bupkis/commit/1f3b149e1aa42f90469b96244224fe6736175c25))
38
+
39
+
40
+ ### Bug Fixes
41
+
42
+ * **guards:** thenable.then must have at least one parameter ([41a987e](https://github.com/boneskull/bupkis/commit/41a987e5ec131b780124bf6459b900bf15643987))
43
+ * re-export schema namespace ([497bad7](https://github.com/boneskull/bupkis/commit/497bad7104b6ee5195f5c4d566837e8e34a1d744))
44
+
3
45
  ## [0.6.0](https://github.com/boneskull/bupkis/compare/bupkis-v0.5.1...bupkis-v0.6.0) (2025-09-22)
4
46
 
5
47
 
package/README.md CHANGED
@@ -17,13 +17,13 @@
17
17
 
18
18
  ## Motivation
19
19
 
20
- > "_Another_ assertion library? You cannot be serious. My test framework has its own assertions!"
20
+ > _"Another assertion library? You cannot be serious, dogg. My test framework has its own assertions!"_
21
21
  >
22
- > sickos, probably
22
+ > <small>‒sickos, probably</small>
23
23
 
24
24
  Look, we're ~~old~~ ~~wizened~~ ~~experienced~~ knowledgeable and we've written a lot of tests. We've used a lot of assertion libraries. There are ones we prefer and ones we don't.
25
25
 
26
- But none of them do quite what **BUPKIS** does. We want an assertion library that prioritizes:
26
+ But none of them do quite what <strong><span class="bupkis">BUPKIS</span></strong> does. We want an assertion library that prioritizes:
27
27
 
28
28
  - Type safety
29
29
  - Uncompromisable extensibility
@@ -33,7 +33,7 @@ We can think of several that tick two-thirds of those boxes! But _we demand the
33
33
 
34
34
  > ⚠️ **Caution!**
35
35
  >
36
- > Assertion libraries tend come in two flavors: chainable or stiff & traditional. But because these styles are likely _familiar_ to you, you may hate **BUPKIS**.
36
+ > Assertion libraries tend come in two flavors: chainable or stiff & traditional. But because these styles are likely _familiar_ to you, you may hate <strong><span class="bupkis">BUPKIS</span></strong>.
37
37
  >
38
38
  > We _want_ you to like it, yes. But if you don't, we're content with just making our point and asking the following favor of the reader:
39
39
  >
@@ -43,9 +43,9 @@ The following is a brief overview of the design choices we made to serve these g
43
43
 
44
44
  ### Natural Language Assertions
45
45
 
46
- In **BUPKIS**, "natural language" is the means to the end of "a small API surface".
46
+ In <strong><span class="bupkis">BUPKIS</span></strong>, "natural language" is the means to the end of "a small API surface".
47
47
 
48
- When you're using **BUPKIS**, you **don't** write this:
48
+ When you're using <strong><span class="bupkis">BUPKIS</span></strong>, you **don't** write this:
49
49
 
50
50
  ```js
51
51
  expect(actual).toEqual(expected);
@@ -73,7 +73,7 @@ If another assertion library wants you to write:
73
73
  expect(actual).to.be.a('string');
74
74
  ```
75
75
 
76
- Then **BUPKIS** wants you to write:
76
+ Then <strong><span class="bupkis">BUPKIS</span></strong> wants you to write:
77
77
 
78
78
  ```js
79
79
  expect(actual, 'to be a string');
@@ -81,13 +81,13 @@ expect(actual, 'to be a string');
81
81
  expect(actual, 'to be an string');
82
82
  ```
83
83
 
84
- Can't remember the phrase? Did you forget a word or make a typo? Maybe you also forgot \***\*BUPKIS** is type-safe?!\*\* You'll get a nice squiggly for your trouble.
84
+ Can't remember the phrase? Did you forget a word or make a typo? Maybe you also forgot <strong><span class="bupkis">BUPKIS</span></strong> is type-safe?! You'll get a nice squiggly for your trouble.
85
85
 
86
86
  This isn't black magic. It ain't no _cauldron_. We're not just _throwing rat tails and `string`s into a function and stirring that shit up._
87
87
 
88
- > "Preposterous! Codswallop!"
88
+ > _"Preposterous! Functions. Things of that nature."_
89
89
  >
90
- > the reader and/or more sickos
90
+ > <small>‒the reader and/or more sickos</small>
91
91
 
92
92
  You may wonder how this could this be anything _but_ loosey-goosey _senselessness_. On the contrary—we have _conventions_!
93
93
 
@@ -95,9 +95,9 @@ You may wonder how this could this be anything _but_ loosey-goosey _senselessnes
95
95
 
96
96
  To formalize the conventions at a high level:
97
97
 
98
- - The first parameter to a **BUPKIS** assertion is always the _subject_ ([def.](https://bupkis.zip/documents/Reference.Glossary_of_Terms#subject)).
98
+ - The first parameter to a <strong><span class="bupkis">BUPKIS</span></strong> assertion is always the _subject_ ([def.](https://bupkis.zip/documents/Reference.Glossary_of_Terms#subject)).
99
99
 
100
- - The "string" part of a **BUPKIS** assertion is known as a _phrase_. Every expectation will contain _at minimum_ one (1) phrase. As you can see from the above "to be a string" example, phrases often have aliases.
100
+ - The "string" part of a <strong><span class="bupkis">BUPKIS</span></strong> assertion is known as a _phrase_. Every expectation will contain _at minimum_ one (1) phrase. As you can see from the above "to be a string" example, phrases often have aliases.
101
101
 
102
102
  - Assertions may have multiple phrases or parameters, but the simplest assertions always look like this:
103
103
 
@@ -111,12 +111,12 @@ To formalize the conventions at a high level:
111
111
  expect(subject, 'phrase', [parameter?, phrase?, parameter?, ...]);
112
112
  ```
113
113
 
114
- - If an assertion's phrase contains something like "to satisfy" or "satisfying", then the next parameter has special meaning. It is somewhat like Jest's `expect.objectContaining()`, but more powerful (prior art: [unexpected's `to satisfy` assertion](https://unexpected.js.org/assertions/any/to-satisfy/)).
114
+ - If an assertion's phrase contains something like "to satisfy" or "satisfying", then the next parameter has special meaning. It is somewhat like Jest's `expect.objectContaining()`, but more powerful (prior art: [unexpected's `to satisfy` assertion][unexpected-to-satisfy]).
115
115
 
116
116
  There are three (3) things to know about this parameter:
117
- 1. It matches objects, but only verifies that the keys provided are present and the values match.
118
- 2. If the value of any given property in an object is a _regular expression_, the real value will be coerced to a string and tested against the regular expression. This provides easy string matching within nested properties.
119
- 3. _Any assertion_ (including custom assertions) can be embedded within them via the `expect.it()` function:
117
+ 1. It matches objects, but only verifies that the keys provided are a) **present** and the values _satisfy_ the values in the expected object.
118
+ 2. If the value of any given property in an object is a _regular expression_ (`RegExp`), the actual value will be coerced to a string and tested against the regular expression. This provides easy string matching within nested properties (see below example for what this looks like).
119
+ 3. _Any assertion_ (including custom assertions) can be embedded within an object parameter via the `expect.it()` function:
120
120
 
121
121
  ```ts
122
122
  expect(user, 'to satisfy', {
@@ -134,9 +134,9 @@ To formalize the conventions at a high level:
134
134
  });
135
135
  ```
136
136
 
137
- > See [Embeddable Assertions][] for more a thorough explanation.
137
+ > 👉 See [Embeddable Assertions][] for more a thorough explanation of `expect.it()`.
138
138
 
139
- - You can _negate_ just about any phrase by prepending it with `not`. For example:
139
+ - You can _negate_ **any** assertion by prepending its first phrase with `not`. For example:
140
140
 
141
141
  ```js
142
142
  expect(actual, 'to be', expected);
@@ -151,11 +151,11 @@ To formalize the conventions at a high level:
151
151
  );
152
152
  ```
153
153
 
154
- Handy!
154
+ _How about them apples._
155
155
 
156
156
  ### Custom Assertions Built With Zod
157
157
 
158
- [Zod][] is a popular object validation library which does some heavy lifting for **BUPKIS**—most of the built-in assertions are implemented using Zod schemas. And so **BUPKIS** extends this capability to you.
158
+ [Zod][] is a popular object validation library which does some heavy lifting for <strong><span class="bupkis">BUPKIS</span></strong>—most of the built-in assertions are implemented using Zod schemas. And so <strong><span class="bupkis">BUPKIS</span></strong> extends this capability to you.
159
159
 
160
160
  An example will be illuminating. What follows is a ~~stupid~~ ~~quick~~ _stupid_ example of a creating and "registering" a basic assertion _which can be invoked using two different phrases_:
161
161
 
@@ -177,11 +177,13 @@ expect('fam', 'to be bussin');
177
177
  expect('skiball lavatory', 'to be a string');
178
178
  ```
179
179
 
180
- > 📒 Registration?
180
+ > 📒 Assertion Registration?
181
181
  >
182
- > "Registration" of an assertion (though there is no stateful "registry" anywhere) is as straightforward as passing an array of `Assertion` instances (created via `createAssertion()`/`createAsyncAssertion()`) to the `use()` function.
182
+ > "Registration" of an assertion (a misnomer; there is no stateful "registry" in <strong><span class="bupkis">BUPKIS</span></strong>) is as straightforward as passing an array of objects created by `createAssertion()` and/or `createAsyncAssertion()` to the `use()` function.
183
183
  >
184
- > `use()`, as exported from `bupkis`, returns a new `expect()`/`expectAsync()` pair that includes your custom assertions alongside all the built-in ones. The new `expect()`/`expectAsync()` functions are fully type-safe and aware of your custom assertions. They _also_ have a `.use()` method, which allows you to compose sets of assertions from disjoint sources.
184
+ > `use()`, as exported from `bupkis`, returns a new `expect()`/`expectAsync()` pair that which can execute _your_ custom assertions _in addition to_ every built-in assertion.
185
+ >
186
+ > The `expect()`/`expectAsync()` functions returned by `use()` are fully type-safe and aware of your custom assertions. Each `expect()`/`expectAsync()` function has a `.use()` method as well; this allows you to compose multiple sets of assertions together (like from several assertion plugin packages).
185
187
 
186
188
  **Zod makes it extremely easy to create most custom assertions**. But despite its power, it can't do _everything_ we need an assertion to do; for those situations, there's also a [function-based API][custom-assertion-function] for use with [parametric][] and behavioral (e.g., involving function execution) assertions.
187
189
 
@@ -189,7 +191,7 @@ expect('skiball lavatory', 'to be a string');
189
191
 
190
192
  ### Excruciating Type Safety
191
193
 
192
- We have tried to make **BUPKIS** is as type-safe as possible. To be clear, _that is pretty damn possible_. This means:
194
+ We have tried to make <strong><span class="bupkis">BUPKIS</span></strong> is as type-safe as possible. To be clear, _that is pretty damn possible_. This means:
193
195
 
194
196
  - Every built-in assertion is fully type-safe and is declared as an overload for `expect()` or `expectAsync()`.
195
197
  - Every _custom_ assertion is _also_ fully type-safe and is declared as an overload for `expect()` or `expectAsync()` (as returned from `use()`)
@@ -201,11 +203,11 @@ We have tried to make **BUPKIS** is as type-safe as possible. To be clear, _that
201
203
 
202
204
  **Node.js**: ^20.19.0, ^22.12.0, >=23
203
205
 
204
- **BUPKIS** has a peer dependency on [Zod][] v4+, but will install it as an optional dependency if you are not already using it.
206
+ <strong><span class="bupkis">BUPKIS</span></strong> has a peer dependency on [Zod][] v4+, but will install it as an optional dependency if you are not already using it.
205
207
 
206
- **BUPKIS** ships as a dual CJS/ESM package.
208
+ <strong><span class="bupkis">BUPKIS</span></strong> ships as a dual CJS/ESM package.
207
209
 
208
- > Disclaimer: **BUPKIS** has been designed to run on Node.js in a development environment. Anyone attempting to deploy **BUPKIS** to some server somewhere will get what is coming to them.
210
+ > Disclaimer: <strong><span class="bupkis">BUPKIS</span></strong> has been designed to run on Node.js in a development environment. Anyone attempting to deploy <strong><span class="bupkis">BUPKIS</span></strong> to some server somewhere will get what is coming to them.
209
211
 
210
212
  ## Installation
211
213
 
@@ -221,14 +223,14 @@ npm install bupkis -D
221
223
 
222
224
  ## Acknowledgements
223
225
 
224
- - [Unexpected][] is the main inspiration for **BUPKIS**. However, creating types for this library was exceedingly difficult (and was in fact the first thing we tried). Despite that drawback, we found it exquisitely usable.
225
- - [Zod][] is a popular object validation library upon which **BUPKIS** builds many of its own assertions.
226
+ - [Unexpected][] is the main inspiration for <strong><span class="bupkis">BUPKIS</span></strong>. However, creating types for this library was exceedingly difficult (and was in fact the first thing we tried). Despite that drawback, we found it exquisitely usable.
227
+ - [Zod][] is a popular object validation library upon which <strong><span class="bupkis">BUPKIS</span></strong> builds many of its own assertions.
226
228
  - [fast-check][]: Thanks to Nicholas Dubien for this library. There is **no better library** for an assertion library to use to test itself! Well, besides itself, we mean. How about _in addition to_ itself? Yes. Thank you!
227
229
  - [tshy][] from Isaac Schlueter. Thanks for making dual ESM/CJS packages easy and not too fancy.
228
230
  - [TypeDoc][] it really documents the hell out of TypeScript projects.
229
231
  - [@cjihrig](https://github.com/cjihrig) and other Node.js contributors for the thoughtfulness put into [`node:test`](https://nodejs.org/api/test.html) that make it my current test-runner-of-choice.
230
232
 
231
- ## Why is it called **BUPKIS**?
233
+ ## Why is it called BUPKIS?
232
234
 
233
235
  TODO: think of good reason and fill in later
234
236
 
@@ -248,3 +250,4 @@ Copyright © 2025 Christopher Hiller. Licensed under [BlueOak-1.0.0](https://blu
248
250
  [tshy]: https://github.com/isaacs/tshy
249
251
  [typedoc]: https://typedoc.org
250
252
  [embeddable assertions]: https://bupkis.zip/documents/Basic_Usage#embeddable-assertions
253
+ [unexpected-to-satisfy]: https://unexpected.js.org/assertions/any/to-satisfy/
@@ -1 +1 @@
1
- {"version":3,"file":"assertion-async.d.ts","sourceRoot":"","sources":["../../../src/assertion/assertion-async.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,KAAK,cAAc,EACnB,KA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AAC,KAAK,CAAC,EAC5C,KAAK,SAAS,cAAc,CAAC,KAAK,CAAC,CAErC,SAAQ,oBAAoB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAC/C,YAAW,oBAAoB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;IAEpC,YAAY,CACzB,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC,EACjC,KAAK,EAAE,OAAO,EAAE,EAChB,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACrC,WAAW,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,GAChC,OAAO,CAAC,IAAI,CAAC;IA0BD,gBAAgB,CAAC,IAAI,SAAS,SAAS,OAAO,EAAE,EAC7D,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IA4E/B;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;CAehC"}
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.BupkisAssertionSchemaAsync = exports.BupkisAssertionFunctionAsync = exports.BupkisAssertionAsync = void 0;
7
- const debug_1 = __importDefault(require("debug"));
8
7
  const util_1 = require("util");
9
8
  const v4_1 = __importDefault(require("zod/v4"));
10
9
  const constant_js_1 = require("../constant.js");
@@ -12,7 +11,6 @@ const error_js_1 = require("../error.js");
12
11
  const guards_js_1 = require("../guards.js");
13
12
  const metadata_js_1 = require("../metadata.js");
14
13
  const assertion_js_1 = require("./assertion.js");
15
- const debug = (0, debug_1.default)('bupkis:assertion:async');
16
14
  class BupkisAssertionAsync extends assertion_js_1.BupkisAssertion {
17
15
  async parseValuesAsync(args) {
18
16
  const { slots } = this;
@@ -36,7 +34,6 @@ class BupkisAssertionAsync extends assertion_js_1.BupkisAssertion {
36
34
  // unknown/any accept anything
37
35
  // IMPORTANT: do not use a type guard here; it will break inference
38
36
  if (slot.def.type === 'unknown' || slot.def.type === 'any') {
39
- debug('Skipping unknown/any slot validation for arg', arg);
40
37
  parsedValues.push(arg);
41
38
  exactMatch = false;
42
39
  continue;
@@ -104,7 +101,7 @@ class BupkisAssertionFunctionAsync extends BupkisAssertionAsync {
104
101
  throw this.fromZodError(result, stackStartFn, parsedValues);
105
102
  }
106
103
  else if (result) {
107
- throw new TypeError(`Invalid return type from assertion ${this}; expected boolean, ZodType, or AssertionFailure`);
104
+ throw new error_js_1.AssertionImplementationError(`Invalid return type from assertion ${this}; expected boolean, ZodType, or AssertionFailure`, { result });
108
105
  }
109
106
  }
110
107
  }
@@ -127,12 +124,9 @@ class BupkisAssertionSchemaAsync extends BupkisAssertionAsync {
127
124
  const cachedValidation = parseResult?.success
128
125
  ? parseResult.subjectValidationResult
129
126
  : undefined;
130
- if (cachedValidation) {
131
- debug('Using cached subject validation result from parseValuesAsync for %s', this);
132
- if (!cachedValidation.success) {
133
- // Subject validation failed during parseValuesAsync, throw the cached error
134
- throw this.fromZodError(cachedValidation.error, stackStartFn, parsedValues);
135
- }
127
+ if (cachedValidation && !cachedValidation.success) {
128
+ // Subject validation failed during parseValuesAsync, throw the cached error
129
+ throw this.fromZodError(cachedValidation.error, stackStartFn, parsedValues);
136
130
  }
137
131
  // Fall back to standard validation if no cached result
138
132
  const [subject] = parsedValues;
@@ -187,7 +181,6 @@ class BupkisAssertionSchemaAsync extends BupkisAssertionAsync {
187
181
  }
188
182
  // Standard slot processing for non-optimized cases
189
183
  if (slot.def.type === 'unknown' || slot.def.type === 'any') {
190
- debug('Skipping unknown/any slot validation for arg', arg);
191
184
  parsedValues.push(arg);
192
185
  exactMatch = false;
193
186
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"assertion-async.js","sourceRoot":"","sources":["../../../src/assertion/assertion-async.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+BAA+B;AAC/B,gDAAuB;AAEvB,gDAAgD;AAChD,0CAA6C;AAC7C,4CAM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AAC,EACvC,KAAK,SAAS,cAAc,CAAC,KAAK,CAAC,CAErC,SAAQ,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAC9C,YAAW,qBAAqB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;IAE3C,OAAO,CACd,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC,EACjC,IAAI,EAAE,OAAO,EAAE,EACf,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACrC,YAAY,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,GACjC,IAAI;CA0CR;AAED;;;;;;;;;;;GAWG;AAEH,qBAAa,yBAAyB,CAClC,KAAK,SAAS,cAAc,EAC5B,IAAI,SAAS,uBAAuB,CAAC,KAAK,CAAC,EAC3C,KAAK,SAAS,cAAc,CAAC,KAAK,CAAC,CAErC,SAAQ,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAC9C,YAAW,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;IAEzC,OAAO,CACd,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC,EACjC,KAAK,EAAE,OAAO,EAAE,EAChB,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACrC,WAAW,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,GAChC,IAAI;IA2BE,WAAW,CAAC,IAAI,SAAS,SAAS,OAAO,EAAE,EAClD,IAAI,EAAE,IAAI,GACT,YAAY,CAAC,KAAK,CAAC;IAwEtB;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;CAehC"}
@@ -62,15 +62,10 @@ class BupkisAssertionSync extends assertion_js_1.BupkisAssertion {
62
62
  // unknown/any accept anything
63
63
  // IMPORTANT: do not use a type guard here
64
64
  if (slot.def.type === 'unknown' || slot.def.type === 'any') {
65
- // debug('Skipping unknown/any slot validation for arg', arg);
66
65
  parsedValues.push(arg);
67
66
  exactMatch = false;
68
67
  continue;
69
68
  }
70
- // low-effort check
71
- if ((0, guards_js_1.isZodPromise)(slot)) {
72
- throw new TypeError(`${this} expects a Promise for slot ${i}; use expectAsync() instead of expect()`);
73
- }
74
69
  const result = slot.safeParse(arg);
75
70
  if (!result.success) {
76
71
  return {
@@ -95,9 +90,9 @@ class BupkisAssertionFunctionSync extends BupkisAssertionSync {
95
90
  if ((0, guards_js_1.isPromiseLike)(result)) {
96
91
  // Avoid unhandled promise rejection
97
92
  Promise.resolve(result).catch((err) => {
98
- debug(`Ate unhandled rejection from assertion %s: %O`, this, err);
93
+ debug(`⚠️ Ate unhandled rejection from assertion %s: %O`, this, err);
99
94
  });
100
- throw new TypeError(`Assertion ${this} returned a Promise; use expectAsync() instead of expect()`);
95
+ throw new error_js_1.UnexpectedAsyncError(`Assertion ${this} returned a Promise; use expectAsync() instead of expect()`);
101
96
  }
102
97
  if ((0, guards_js_1.isZodType)(result)) {
103
98
  const zodResult = result.safeParse(parsedValues[0]);
@@ -123,7 +118,7 @@ class BupkisAssertionFunctionSync extends BupkisAssertionSync {
123
118
  throw this.fromZodError(result, stackStartFn, parsedValues);
124
119
  }
125
120
  else if (result) {
126
- throw new TypeError(`Invalid return type from assertion ${this}; expected boolean, ZodType, or AssertionFailure`);
121
+ throw new error_js_1.AssertionImplementationError(`Invalid return type from assertion ${this}; expected boolean, ZodType, or AssertionFailure`, { result });
127
122
  }
128
123
  }
129
124
  }
@@ -147,7 +142,6 @@ class BupkisAssertionSchemaSync extends BupkisAssertionSync {
147
142
  ? parseResult.subjectValidationResult
148
143
  : undefined;
149
144
  if (cachedValidation) {
150
- debug('Using cached subject validation result from parseValues for %s', this);
151
145
  if (!cachedValidation.success) {
152
146
  // Subject validation failed during parseValues, throw the cached error
153
147
  throw this.fromZodError(cachedValidation.error, stackStartFn, parsedValues);
@@ -199,14 +193,10 @@ class BupkisAssertionSchemaSync extends BupkisAssertionSync {
199
193
  }
200
194
  // Standard slot processing for non-optimized cases
201
195
  if (slot.def.type === 'unknown' || slot.def.type === 'any') {
202
- debug('Skipping unknown/any slot validation for arg', arg);
203
196
  parsedValues.push(arg);
204
197
  exactMatch = false;
205
198
  continue;
206
199
  }
207
- if ((0, guards_js_1.isZodPromise)(slot)) {
208
- throw new TypeError(`${this} expects a Promise for slot ${i}; use expectAsync() instead of expect()`);
209
- }
210
200
  const result = slot.safeParse(arg);
211
201
  if (!result.success) {
212
202
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"assertion-sync.js","sourceRoot":"","sources":["../../../src/assertion/assertion-sync.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;AAEH,kDAA0B;AAC1B,+BAA+B;AAC/B,+BAA2B;AAE3B,gDAAgD;AAChD,0CAA6C;AAC7C,4CAOsB;AACtB,gDAAgD;AAchD,iDAAiD;AAEjD,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,uBAAuB,CAAC,CAAC;AAE7C;;;;GAIG;AACH,MAAsB,mBAKpB,SAAQ,8BAAmC;IAiB3C;;;;;;;;;;;;;;OAcG;IACH,WAAW,CACT,IAAU;QAEV,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QACvB,MAAM,YAAY,GAAU,EAAE,CAAC;QAE/B,MAAM,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;QACxD,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,IAAI,UAAU,GAAG,IAAI,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;YACvB,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAEpB,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC,EAAE,GAA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DAsIC"}
@@ -35,19 +35,6 @@ export declare abstract class BupkisAssertion<Parts extends AssertionParts, Impl
35
35
  * @returns String representation
36
36
  */
37
37
  toString(): string;
38
- /**
39
- * Translates a {@link z.ZodError} into an {@link AssertionError} with a
40
- * human-friendly message.
41
- *
42
- * @remarks
43
- * This does not handle parameterized assertions with more than one parameter
44
- * too cleanly; it's unclear how a test runner would display the expected
45
- * values. This will probably need a fix in the future.
46
- * @param stackStartFn The function to start the stack trace from
47
- * @param zodError The original `ZodError`
48
- * @param values Values which caused the error
49
- * @returns New `AssertionError`
50
- */
51
38
  /**
52
39
  * Translates a {@link z.ZodError} into an {@link AssertionError} with a
53
40
  * human-friendly message.
@@ -1 +1 @@
1
- {"version":3,"file":"assertion.d.ts","sourceRoot":"","sources":["../../../src/assertion/assertion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAa9B;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;EAGnC,CAAC;AAEJ;;GAEG;AACH,8BAAsB,eAAe,CACnC,KAAK,SAAS,cAAc,EAC5B,IAAI,SAAS,aAAa,CAAC,KAAK,CAAC,EACjC,KAAK,SAAS,cAAc,CAAC,KAAK,CAAC,CACnC,YAAW,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;IAKtC,QAAQ,CAAC,KAAK,EAAE,KAAK;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK;IACrB,QAAQ,CAAC,IAAI,EAAE,IAAI;I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5B"}
@@ -19,9 +19,11 @@ const slug_1 = __importDefault(require("slug"));
19
19
  const util_1 = require("util");
20
20
  const v4_1 = require("zod/v4");
21
21
  const constant_js_1 = require("../constant.js");
22
+ const diff_js_1 = require("../diff.js");
22
23
  const error_js_1 = require("../error.js");
23
24
  const metadata_js_1 = require("../metadata.js");
24
25
  const debug = (0, debug_1.default)('bupkis:assertion');
26
+ const { hasOwn, keys } = Object;
25
27
  /**
26
28
  * Modified charmap for {@link slug} to use underscores to replace hyphens (`-`;
27
29
  * and for hyphens to replace everything else that needs replacing) and `<` with
@@ -47,7 +49,7 @@ class BupkisAssertion {
47
49
  this.slots = slots;
48
50
  this.impl = impl;
49
51
  this.id = this.generateAssertionId();
50
- debug('Created assertion %s', this);
52
+ debug('Created assertion %s', this);
51
53
  }
52
54
  metadata() {
53
55
  return exports.AssertionMetadataRegistry.get(this);
@@ -56,6 +58,14 @@ class BupkisAssertion {
56
58
  * @returns String representation
57
59
  */
58
60
  toString() {
61
+ /**
62
+ * Expands a Zod type into a human-readable string representation.
63
+ *
64
+ * @function
65
+ * @param zodType The Zod type to expand
66
+ * @param wrapCurlies Whether to wrap the result in curly braces
67
+ * @returns String representation of the Zod type
68
+ */
59
69
  const expand = (zodType, wrapCurlies = false) => {
60
70
  const def = 'def' in zodType ? zodType.def : zodType._zod.def;
61
71
  let repr = '';
@@ -75,7 +85,7 @@ class BupkisAssertion {
75
85
  : 'custom';
76
86
  }
77
87
  catch (err) {
78
- debug(`Warning: Unable to extract custom class name from Zod type(did Zod's API change?): ${err}`);
88
+ debug(`⚠️ WARNING: Unable to extract custom class name from Zod type(did Zod's API change?): ${err}`);
79
89
  repr = 'custom';
80
90
  }
81
91
  break;
@@ -84,7 +94,7 @@ class BupkisAssertion {
84
94
  repr = `{${expand(def.innerType)}}`;
85
95
  break;
86
96
  case 'enum':
87
- repr = `${Object.keys(def.entries).join(' / ')}`;
97
+ repr = `${keys(def.entries).join(' / ')}`;
88
98
  break;
89
99
  case 'intersection':
90
100
  repr = `${expand(def.left)} & ${expand(def.right)}`;
@@ -128,24 +138,11 @@ class BupkisAssertion {
128
138
  return wrapCurlies ? `{${repr}}` : repr;
129
139
  };
130
140
  return `"${this.slots
131
- .map((slot) => Object.hasOwn(metadata_js_1.BupkisRegistry.get(slot) ?? {}, constant_js_1.kStringLiteral)
141
+ .map((slot) => hasOwn(metadata_js_1.BupkisRegistry.get(slot) ?? {}, constant_js_1.kStringLiteral)
132
142
  ? expand(slot)
133
143
  : expand(slot, true))
134
144
  .join(' ')}"`;
135
145
  }
136
- /**
137
- * Translates a {@link z.ZodError} into an {@link AssertionError} with a
138
- * human-friendly message.
139
- *
140
- * @remarks
141
- * This does not handle parameterized assertions with more than one parameter
142
- * too cleanly; it's unclear how a test runner would display the expected
143
- * values. This will probably need a fix in the future.
144
- * @param stackStartFn The function to start the stack trace from
145
- * @param zodError The original `ZodError`
146
- * @param values Values which caused the error
147
- * @returns New `AssertionError`
148
- */
149
146
  /**
150
147
  * Translates a {@link z.ZodError} into an {@link AssertionError} with a
151
148
  * human-friendly message.
@@ -160,19 +157,37 @@ class BupkisAssertion {
160
157
  * @returns New `AssertionError`
161
158
  */
162
159
  fromZodError(zodError, stackStartFn, values) {
163
- const flat = v4_1.z.flattenError(zodError);
164
- let pretty = flat.formErrors.join('; ');
165
- for (const [keypath, errors] of Object.entries(flat.fieldErrors)) {
166
- pretty += `; ${keypath}: ${errors.join('; ')}`;
160
+ // Extract the subject (first value) from parsed values for diff generation
161
+ const subject = values.length > 0 ? values[0] : undefined;
162
+ // Try to extract meaningful actual/expected values for Node.js diff
163
+ const { actual, expected } = (0, diff_js_1.extractDiffValues)(zodError, subject);
164
+ // Only use custom message if we could extract diff values
165
+ if ((0, diff_js_1.shouldGenerateDiff)(actual, expected)) {
166
+ // Use jest-diff to generate rich, colored diff output
167
+ const diffOutput = (0, diff_js_1.generateDiff)(expected, actual, {
168
+ aAnnotation: 'Expected',
169
+ bAnnotation: 'Received',
170
+ expand: false,
171
+ includeChangeCounts: true,
172
+ });
173
+ const message = diffOutput
174
+ ? `Assertion ${this} failed:\n${diffOutput}`
175
+ : `Assertion ${this} failed: values are not equal`;
176
+ return new error_js_1.AssertionError({
177
+ actual,
178
+ expected,
179
+ message,
180
+ stackStartFn,
181
+ });
182
+ }
183
+ else {
184
+ // Fall back to Zod's prettified error message
185
+ const pretty = v4_1.z.prettifyError(zodError).slice(2);
186
+ return new error_js_1.AssertionError({
187
+ message: `Assertion ${this} failed:\n${pretty}`,
188
+ stackStartFn,
189
+ });
167
190
  }
168
- const [actual, ...expected] = values;
169
- return new error_js_1.AssertionError({
170
- actual,
171
- expected: expected.length === 1 ? expected[0] : expected,
172
- message: `Assertion ${this} failed: ${pretty}`,
173
- operator: `${this}`,
174
- stackStartFn,
175
- });
176
191
  }
177
192
  maybeParseValuesArgMismatch(args) {
178
193
  if (this.slots.length !== args.length) {
@@ -210,7 +225,7 @@ class BupkisAssertion {
210
225
  }
211
226
  else {
212
227
  /* c8 ignore next */
213
- throw new TypeError(`Invalid metadata for slot ${slotIndex} with value ${(0, util_1.inspect)(rawArg)}`);
228
+ throw new error_js_1.InvalidMetadataError(`Invalid metadata for slot ${slotIndex} with value ${(0, util_1.inspect)(rawArg)}`, { metadata: meta });
214
229
  }
215
230
  return true;
216
231
  }