assertron 11.5.2 → 11.5.4

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 (240) hide show
  1. package/README.md +7 -7
  2. package/cjs/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js +12 -0
  3. package/cjs/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPrimitive.js +14 -0
  4. package/cjs/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPropertyKey.js +9 -0
  5. package/cjs/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/typeof.js +16 -0
  6. package/cjs/_virtual/_rolldown/runtime.js +23 -0
  7. package/cjs/assert-order/AssertOrder.d.ts +42 -39
  8. package/cjs/assert-order/AssertOrder.d.ts.map +1 -1
  9. package/cjs/assert-order/AssertOrder.js +118 -146
  10. package/cjs/assert-order/AssertOrder.js.map +1 -1
  11. package/cjs/assert-order/InvalidOrder.d.ts +10 -7
  12. package/cjs/assert-order/InvalidOrder.d.ts.map +1 -1
  13. package/cjs/assert-order/InvalidOrder.js +24 -43
  14. package/cjs/assert-order/InvalidOrder.js.map +1 -1
  15. package/cjs/assert-order/StateMachine.js +101 -156
  16. package/cjs/assert-order/StateMachine.js.map +1 -1
  17. package/cjs/assert-order/index.d.ts +4 -4
  18. package/cjs/assert-order/types.d.ts +9 -6
  19. package/cjs/assert-order/types.d.ts.map +1 -1
  20. package/cjs/assertron/assertron.d.ts +23 -20
  21. package/cjs/assertron/assertron.d.ts.map +1 -1
  22. package/cjs/assertron/assertron.js +36 -39
  23. package/cjs/assertron/assertron.js.map +1 -1
  24. package/cjs/assertron/falsy.js +5 -6
  25. package/cjs/assertron/falsy.js.map +1 -1
  26. package/cjs/assertron/index.d.ts +3 -3
  27. package/cjs/assertron/isInstanceof.js +6 -7
  28. package/cjs/assertron/isInstanceof.js.map +1 -1
  29. package/cjs/assertron/pathEqual.js +7 -8
  30. package/cjs/assertron/pathEqual.js.map +1 -1
  31. package/cjs/assertron/rejects.js +8 -8
  32. package/cjs/assertron/rejects.js.map +1 -1
  33. package/cjs/assertron/repeat.js +23 -31
  34. package/cjs/assertron/repeat.js.map +1 -1
  35. package/cjs/assertron/resolves.js +8 -8
  36. package/cjs/assertron/resolves.js.map +1 -1
  37. package/cjs/assertron/satisfies.d.ts +5 -10
  38. package/cjs/assertron/satisfies.d.ts.map +1 -1
  39. package/cjs/assertron/satisfies.js +12 -14
  40. package/cjs/assertron/satisfies.js.map +1 -1
  41. package/cjs/assertron/throws.js +48 -55
  42. package/cjs/assertron/throws.js.map +1 -1
  43. package/cjs/assertron/truthy.js +5 -6
  44. package/cjs/assertron/truthy.js.map +1 -1
  45. package/cjs/errors.d.ts +13 -10
  46. package/cjs/errors.d.ts.map +1 -1
  47. package/cjs/errors.js +19 -29
  48. package/cjs/errors.js.map +1 -1
  49. package/cjs/index.d.ts +10 -8
  50. package/cjs/index.js +98 -37
  51. package/cjs/index.js.map +1 -1
  52. package/cjs/package.json +3 -1
  53. package/cjs/types.d.ts +5 -2
  54. package/cjs/types.d.ts.map +1 -1
  55. package/cjs/utils/index.js +18 -25
  56. package/cjs/utils/index.js.map +1 -1
  57. package/cjs/utils/isErrorConstructor.js +4 -4
  58. package/cjs/utils/isErrorConstructor.js.map +1 -1
  59. package/cjs/utils/notEqualMessage.js +4 -4
  60. package/cjs/utils/notEqualMessage.js.map +1 -1
  61. package/cjs/utils/notSatisfiedMessage.js +14 -23
  62. package/cjs/utils/notSatisfiedMessage.js.map +1 -1
  63. package/cjs/utils/notThrownMessage.js +5 -5
  64. package/cjs/utils/notThrownMessage.js.map +1 -1
  65. package/cjs/utils/promiseMessages.js +7 -13
  66. package/cjs/utils/promiseMessages.js.map +1 -1
  67. package/cjs/utils/unexpectedErrorMessage.js +6 -6
  68. package/cjs/utils/unexpectedErrorMessage.js.map +1 -1
  69. package/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js +12 -0
  70. package/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPrimitive.js +14 -0
  71. package/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPropertyKey.js +9 -0
  72. package/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/typeof.js +11 -0
  73. package/esm/assert-order/AssertOrder.d.ts +42 -39
  74. package/esm/assert-order/AssertOrder.d.ts.map +1 -1
  75. package/esm/assert-order/AssertOrder.js +119 -143
  76. package/esm/assert-order/AssertOrder.js.map +1 -1
  77. package/esm/assert-order/InvalidOrder.d.ts +10 -7
  78. package/esm/assert-order/InvalidOrder.d.ts.map +1 -1
  79. package/esm/assert-order/InvalidOrder.js +24 -39
  80. package/esm/assert-order/InvalidOrder.js.map +1 -1
  81. package/esm/assert-order/StateMachine.js +99 -129
  82. package/esm/assert-order/StateMachine.js.map +1 -1
  83. package/esm/assert-order/index.d.ts +4 -4
  84. package/esm/assert-order/types.d.ts +9 -6
  85. package/esm/assert-order/types.d.ts.map +1 -1
  86. package/esm/assertron/assertron.d.ts +23 -20
  87. package/esm/assertron/assertron.d.ts.map +1 -1
  88. package/esm/assertron/assertron.js +36 -36
  89. package/esm/assertron/assertron.js.map +1 -1
  90. package/esm/assertron/falsy.js +7 -4
  91. package/esm/assertron/falsy.js.map +1 -1
  92. package/esm/assertron/index.d.ts +3 -3
  93. package/esm/assertron/isInstanceof.js +8 -5
  94. package/esm/assertron/isInstanceof.js.map +1 -1
  95. package/esm/assertron/pathEqual.js +9 -6
  96. package/esm/assertron/pathEqual.js.map +1 -1
  97. package/esm/assertron/rejects.js +10 -6
  98. package/esm/assertron/rejects.js.map +1 -1
  99. package/esm/assertron/repeat.js +22 -25
  100. package/esm/assertron/repeat.js.map +1 -1
  101. package/esm/assertron/resolves.js +10 -6
  102. package/esm/assertron/resolves.js.map +1 -1
  103. package/esm/assertron/satisfies.d.ts +5 -10
  104. package/esm/assertron/satisfies.d.ts.map +1 -1
  105. package/esm/assertron/satisfies.js +14 -12
  106. package/esm/assertron/satisfies.js.map +1 -1
  107. package/esm/assertron/throws.js +47 -49
  108. package/esm/assertron/throws.js.map +1 -1
  109. package/esm/assertron/truthy.js +7 -4
  110. package/esm/assertron/truthy.js.map +1 -1
  111. package/esm/errors.d.ts +13 -10
  112. package/esm/errors.d.ts.map +1 -1
  113. package/esm/errors.js +20 -26
  114. package/esm/errors.js.map +1 -1
  115. package/esm/index.d.ts +10 -8
  116. package/esm/index.js +10 -7
  117. package/esm/index.js.map +1 -1
  118. package/esm/types.d.ts +5 -2
  119. package/esm/types.d.ts.map +1 -1
  120. package/esm/utils/index.js +13 -9
  121. package/esm/utils/index.js.map +1 -1
  122. package/esm/utils/isErrorConstructor.js +6 -2
  123. package/esm/utils/isErrorConstructor.js.map +1 -1
  124. package/esm/utils/notEqualMessage.js +6 -2
  125. package/esm/utils/notEqualMessage.js.map +1 -1
  126. package/esm/utils/notSatisfiedMessage.js +15 -20
  127. package/esm/utils/notSatisfiedMessage.js.map +1 -1
  128. package/esm/utils/notThrownMessage.js +7 -3
  129. package/esm/utils/notThrownMessage.js.map +1 -1
  130. package/esm/utils/promiseMessages.js +9 -11
  131. package/esm/utils/promiseMessages.js.map +1 -1
  132. package/esm/utils/unexpectedErrorMessage.js +8 -4
  133. package/esm/utils/unexpectedErrorMessage.js.map +1 -1
  134. package/package.json +43 -68
  135. package/ts/assert-order/AssertOrder.ts +8 -6
  136. package/ts/assert-order/InvalidOrder.ts +4 -6
  137. package/ts/assert-order/StateMachine.ts +11 -7
  138. package/ts/assertron/assertron.ts +9 -19
  139. package/ts/assertron/falsy.ts +1 -2
  140. package/ts/assertron/isInstanceof.ts +1 -4
  141. package/ts/assertron/pathEqual.ts +1 -2
  142. package/ts/assertron/rejects.ts +2 -2
  143. package/ts/assertron/repeat.ts +5 -6
  144. package/ts/assertron/resolves.ts +3 -3
  145. package/ts/assertron/satisfies.ts +2 -4
  146. package/ts/assertron/throws.ts +14 -20
  147. package/ts/assertron/truthy.ts +1 -2
  148. package/ts/errors.ts +5 -1
  149. package/ts/index.ts +2 -2
  150. package/ts/utils/index.ts +1 -1
  151. package/ts/utils/notSatisfiedMessage.ts +2 -2
  152. package/ts/utils/promiseMessages.ts +5 -5
  153. package/cjs/assert-order/StateMachine.d.ts +0 -22
  154. package/cjs/assert-order/StateMachine.d.ts.map +0 -1
  155. package/cjs/assert-order/index.d.ts.map +0 -1
  156. package/cjs/assert-order/index.js +0 -20
  157. package/cjs/assert-order/index.js.map +0 -1
  158. package/cjs/assert-order/types.js +0 -3
  159. package/cjs/assert-order/types.js.map +0 -1
  160. package/cjs/assertron/falsy.d.ts +0 -2
  161. package/cjs/assertron/falsy.d.ts.map +0 -1
  162. package/cjs/assertron/index.d.ts.map +0 -1
  163. package/cjs/assertron/index.js +0 -18
  164. package/cjs/assertron/index.js.map +0 -1
  165. package/cjs/assertron/isInstanceof.d.ts +0 -3
  166. package/cjs/assertron/isInstanceof.d.ts.map +0 -1
  167. package/cjs/assertron/pathEqual.d.ts +0 -2
  168. package/cjs/assertron/pathEqual.d.ts.map +0 -1
  169. package/cjs/assertron/rejects.d.ts +0 -2
  170. package/cjs/assertron/rejects.d.ts.map +0 -1
  171. package/cjs/assertron/repeat.d.ts +0 -6
  172. package/cjs/assertron/repeat.d.ts.map +0 -1
  173. package/cjs/assertron/resolves.d.ts +0 -2
  174. package/cjs/assertron/resolves.d.ts.map +0 -1
  175. package/cjs/assertron/throws.d.ts +0 -6
  176. package/cjs/assertron/throws.d.ts.map +0 -1
  177. package/cjs/assertron/truthy.d.ts +0 -2
  178. package/cjs/assertron/truthy.d.ts.map +0 -1
  179. package/cjs/index.d.ts.map +0 -1
  180. package/cjs/types.js +0 -3
  181. package/cjs/types.js.map +0 -1
  182. package/cjs/utils/index.d.ts +0 -8
  183. package/cjs/utils/index.d.ts.map +0 -1
  184. package/cjs/utils/isErrorConstructor.d.ts +0 -3
  185. package/cjs/utils/isErrorConstructor.d.ts.map +0 -1
  186. package/cjs/utils/notEqualMessage.d.ts +0 -2
  187. package/cjs/utils/notEqualMessage.d.ts.map +0 -1
  188. package/cjs/utils/notSatisfiedMessage.d.ts +0 -3
  189. package/cjs/utils/notSatisfiedMessage.d.ts.map +0 -1
  190. package/cjs/utils/notThrownMessage.d.ts +0 -2
  191. package/cjs/utils/notThrownMessage.d.ts.map +0 -1
  192. package/cjs/utils/promiseMessages.d.ts +0 -3
  193. package/cjs/utils/promiseMessages.d.ts.map +0 -1
  194. package/cjs/utils/unexpectedErrorMessage.d.ts +0 -3
  195. package/cjs/utils/unexpectedErrorMessage.d.ts.map +0 -1
  196. package/esm/assert-order/StateMachine.d.ts +0 -22
  197. package/esm/assert-order/StateMachine.d.ts.map +0 -1
  198. package/esm/assert-order/index.d.ts.map +0 -1
  199. package/esm/assert-order/index.js +0 -4
  200. package/esm/assert-order/index.js.map +0 -1
  201. package/esm/assert-order/types.js +0 -2
  202. package/esm/assert-order/types.js.map +0 -1
  203. package/esm/assertron/falsy.d.ts +0 -2
  204. package/esm/assertron/falsy.d.ts.map +0 -1
  205. package/esm/assertron/index.d.ts.map +0 -1
  206. package/esm/assertron/index.js +0 -2
  207. package/esm/assertron/index.js.map +0 -1
  208. package/esm/assertron/isInstanceof.d.ts +0 -3
  209. package/esm/assertron/isInstanceof.d.ts.map +0 -1
  210. package/esm/assertron/pathEqual.d.ts +0 -2
  211. package/esm/assertron/pathEqual.d.ts.map +0 -1
  212. package/esm/assertron/rejects.d.ts +0 -2
  213. package/esm/assertron/rejects.d.ts.map +0 -1
  214. package/esm/assertron/repeat.d.ts +0 -6
  215. package/esm/assertron/repeat.d.ts.map +0 -1
  216. package/esm/assertron/resolves.d.ts +0 -2
  217. package/esm/assertron/resolves.d.ts.map +0 -1
  218. package/esm/assertron/throws.d.ts +0 -6
  219. package/esm/assertron/throws.d.ts.map +0 -1
  220. package/esm/assertron/truthy.d.ts +0 -2
  221. package/esm/assertron/truthy.d.ts.map +0 -1
  222. package/esm/index.d.ts.map +0 -1
  223. package/esm/types.js +0 -2
  224. package/esm/types.js.map +0 -1
  225. package/esm/utils/index.d.ts +0 -8
  226. package/esm/utils/index.d.ts.map +0 -1
  227. package/esm/utils/isErrorConstructor.d.ts +0 -3
  228. package/esm/utils/isErrorConstructor.d.ts.map +0 -1
  229. package/esm/utils/notEqualMessage.d.ts +0 -2
  230. package/esm/utils/notEqualMessage.d.ts.map +0 -1
  231. package/esm/utils/notSatisfiedMessage.d.ts +0 -3
  232. package/esm/utils/notSatisfiedMessage.d.ts.map +0 -1
  233. package/esm/utils/notThrownMessage.d.ts +0 -2
  234. package/esm/utils/notThrownMessage.d.ts.map +0 -1
  235. package/esm/utils/promiseMessages.d.ts +0 -3
  236. package/esm/utils/promiseMessages.d.ts.map +0 -1
  237. package/esm/utils/unexpectedErrorMessage.d.ts +0 -3
  238. package/esm/utils/unexpectedErrorMessage.d.ts.map +0 -1
  239. package/ts/assert-order/internalInterfaces.ts +0 -5
  240. package/ts/testUtils.ts +0 -81
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../ts/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAA;AACpD,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,KAAK,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../ts/types.ts"],"mappings":";KAAY,kBAAkB;KAClB,iBAAiB,UAAU,iBAAiB,gBAAgB"}
@@ -1,29 +1,22 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.failOnOccurrence = void 0;
18
- const tersify_1 = require("tersify");
19
- __exportStar(require("./isErrorConstructor.js"), exports);
20
- __exportStar(require("./notEqualMessage.js"), exports);
21
- __exportStar(require("./notSatisfiedMessage.js"), exports);
22
- __exportStar(require("./notThrownMessage.js"), exports);
23
- __exportStar(require("./promiseMessages.js"), exports);
24
- __exportStar(require("./unexpectedErrorMessage.js"), exports);
1
+ const require_isErrorConstructor = require("./isErrorConstructor.js");
2
+ const require_notEqualMessage = require("./notEqualMessage.js");
3
+ const require_notSatisfiedMessage = require("./notSatisfiedMessage.js");
4
+ const require_notThrownMessage = require("./notThrownMessage.js");
5
+ const require_promiseMessages = require("./promiseMessages.js");
6
+ const require_unexpectedErrorMessage = require("./unexpectedErrorMessage.js");
7
+ let tersify = require("tersify");
8
+ //#region ts/utils/index.ts
25
9
  function failOnOccurrence(occurrence, error) {
26
- return `Failed on ${occurrence} occurrence: ${(0, tersify_1.tersify)(error, { maxLength: Infinity })}`;
10
+ return `Failed on ${occurrence} occurrence: ${(0, tersify.tersify)(error, { maxLength: Number.POSITIVE_INFINITY })}`;
27
11
  }
12
+ //#endregion
28
13
  exports.failOnOccurrence = failOnOccurrence;
14
+ exports.isErrorConstructor = require_isErrorConstructor.isErrorConstructor;
15
+ exports.notEqualMessage = require_notEqualMessage.notEqualMessage;
16
+ exports.notRejectedMessage = require_promiseMessages.notRejectedMessage;
17
+ exports.notResolvedMessage = require_promiseMessages.notResolvedMessage;
18
+ exports.notSatisfiedMessage = require_notSatisfiedMessage.notSatisfiedMessage;
19
+ exports.notThrownMessage = require_notThrownMessage.notThrownMessage;
20
+ exports.unexpectedErrorMessage = require_unexpectedErrorMessage.unexpectedErrorMessage;
21
+
29
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qCAAiC;AAEjC,0DAAuC;AACvC,uDAAoC;AACpC,2DAAwC;AACxC,wDAAqC;AACrC,uDAAoC;AACpC,8DAA2C;AAE3C,SAAgB,gBAAgB,CAAC,UAAkB,EAAE,KAAU;IAC9D,OAAO,aAAa,UAAU,gBAAgB,IAAA,iBAAO,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAA;AACxF,CAAC;AAFD,4CAEC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../ts/utils/index.ts"],"sourcesContent":["import { tersify } from 'tersify'\n\nexport * from './isErrorConstructor.js'\nexport * from './notEqualMessage.js'\nexport * from './notSatisfiedMessage.js'\nexport * from './notThrownMessage.js'\nexport * from './promiseMessages.js'\nexport * from './unexpectedErrorMessage.js'\n\nexport function failOnOccurrence(occurrence: number, error: any) {\n\treturn `Failed on ${occurrence} occurrence: ${tersify(error, { maxLength: Number.POSITIVE_INFINITY })}`\n}\n"],"mappings":";;;;;;;;AASA,SAAgB,iBAAiB,YAAoB,OAAY;CAChE,OAAO,aAAa,WAAW,gBAAA,GAAe,QAAA,QAAA,CAAQ,OAAO,EAAE,WAAW,OAAO,kBAAkB,CAAC;AACrG"}
@@ -1,8 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isErrorConstructor = void 0;
1
+ //#region ts/utils/isErrorConstructor.ts
4
2
  function isErrorConstructor(validator) {
5
- return Object.prototype.isPrototypeOf.call(Error.prototype, validator.prototype);
3
+ return Object.prototype.isPrototypeOf.call(Error.prototype, validator.prototype);
6
4
  }
5
+ //#endregion
7
6
  exports.isErrorConstructor = isErrorConstructor;
7
+
8
8
  //# sourceMappingURL=isErrorConstructor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isErrorConstructor.js","sourceRoot":"","sources":["../../ts/utils/isErrorConstructor.ts"],"names":[],"mappings":";;;AAEA,SAAgB,kBAAkB,CAAC,SAAc;IAChD,OAAO,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;AACjF,CAAC;AAFD,gDAEC"}
1
+ {"version":3,"file":"isErrorConstructor.js","names":[],"sources":["../../ts/utils/isErrorConstructor.ts"],"sourcesContent":["import type { ErrorConstructor } from '../types.js'\n\nexport function isErrorConstructor(validator: any): validator is ErrorConstructor<any> {\n\treturn Object.prototype.isPrototypeOf.call(Error.prototype, validator.prototype)\n}\n"],"mappings":";AAEA,SAAgB,mBAAmB,WAAoD;CACtF,OAAO,OAAO,UAAU,cAAc,KAAK,MAAM,WAAW,UAAU,SAAS;AAChF"}
@@ -1,8 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.notEqualMessage = void 0;
1
+ //#region ts/utils/notEqualMessage.ts
4
2
  function notEqualMessage(actual, expected) {
5
- return `Expected value to equal ${expected}, but received ${actual}`;
3
+ return `Expected value to equal ${expected}, but received ${actual}`;
6
4
  }
5
+ //#endregion
7
6
  exports.notEqualMessage = notEqualMessage;
7
+
8
8
  //# sourceMappingURL=notEqualMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notEqualMessage.js","sourceRoot":"","sources":["../../ts/utils/notEqualMessage.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,MAAW,EAAE,QAAa;IACzD,OAAO,2BAA2B,QAAQ,kBAAkB,MAAM,EAAE,CAAA;AACrE,CAAC;AAFD,0CAEC"}
1
+ {"version":3,"file":"notEqualMessage.js","names":[],"sources":["../../ts/utils/notEqualMessage.ts"],"sourcesContent":["export function notEqualMessage(actual: any, expected: any) {\n\treturn `Expected value to equal ${expected}, but received ${actual}`\n}\n"],"mappings":";AAAA,SAAgB,gBAAgB,QAAa,UAAe;CAC3D,OAAO,2BAA2B,SAAS,iBAAiB;AAC7D"}
@@ -1,32 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.notSatisfiedMessage = void 0;
4
- const tersify_1 = require("tersify");
1
+ let tersify = require("tersify");
2
+ //#region ts/utils/notSatisfiedMessage.ts
5
3
  function notSatisfiedMessage(entries) {
6
- return entries
7
- .map(e => {
8
- const path = formatPath(e.path);
9
- return `Expect ${path} to satisfy ${formatValue(e.expected)}, but received ${formatValue(e.actual)}`;
10
- })
11
- .join('\n');
4
+ return entries.map((e) => {
5
+ return `Expect ${formatPath(e.path)} to satisfy ${formatValue(e.expected)}, but received ${formatValue(e.actual)}`;
6
+ }).join("\n");
12
7
  }
13
- exports.notSatisfiedMessage = notSatisfiedMessage;
14
8
  function formatPath(entries) {
15
- if (entries.length === 0)
16
- return 'actual';
17
- const nodes = [...entries];
18
- if (isIndice(nodes[0])) {
19
- nodes.unshift('actual');
20
- }
21
- return nodes
22
- .map(n => (isIndice(n) ? `[${n}]` : '.' + n))
23
- .join('')
24
- .slice(1);
9
+ if (entries.length === 0) return "actual";
10
+ const nodes = [...entries];
11
+ if (isIndice(nodes[0])) nodes.unshift("actual");
12
+ return nodes.map((n) => isIndice(n) ? `[${n}]` : "." + n).join("").slice(1);
25
13
  }
26
14
  function isIndice(node) {
27
- return typeof node === 'number';
15
+ return typeof node === "number";
28
16
  }
29
17
  function formatValue(value) {
30
- return (0, tersify_1.tersify)(value);
18
+ return (0, tersify.tersify)(value);
31
19
  }
20
+ //#endregion
21
+ exports.notSatisfiedMessage = notSatisfiedMessage;
22
+
32
23
  //# sourceMappingURL=notSatisfiedMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notSatisfiedMessage.js","sourceRoot":"","sources":["../../ts/utils/notSatisfiedMessage.ts"],"names":[],"mappings":";;;AACA,qCAAiC;AAEjC,SAAgB,mBAAmB,CAAC,OAAe;IAClD,OAAO,OAAO;SACZ,GAAG,CAAC,CAAC,CAAC,EAAE;QACR,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QAC/B,OAAO,UAAU,IAAI,eAAe,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,kBAAkB,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAA;IACrG,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAA;AACb,CAAC;AAPD,kDAOC;AAED,SAAS,UAAU,CAAC,OAA4B;IAC/C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAA;IACzC,MAAM,KAAK,GAAG,CAAC,GAAG,OAAO,CAAC,CAAA;IAC1B,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;QACvB,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;KACvB;IACD,OAAO,KAAK;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;SAC5C,IAAI,CAAC,EAAE,CAAC;SACR,KAAK,CAAC,CAAC,CAAC,CAAA;AACX,CAAC;AAED,SAAS,QAAQ,CAAC,IAAqB;IACtC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAA;AAChC,CAAC;AAED,SAAS,WAAW,CAAC,KAAU;IAC9B,OAAO,IAAA,iBAAO,EAAC,KAAK,CAAC,CAAA;AACtB,CAAC"}
1
+ {"version":3,"file":"notSatisfiedMessage.js","names":[],"sources":["../../ts/utils/notSatisfiedMessage.ts"],"sourcesContent":["import type { Diff } from 'satisfier'\nimport { tersify } from 'tersify'\n\nexport function notSatisfiedMessage(entries: Diff[]) {\n\treturn entries\n\t\t.map((e) => {\n\t\t\tconst path = formatPath(e.path)\n\t\t\treturn `Expect ${path} to satisfy ${formatValue(e.expected)}, but received ${formatValue(e.actual)}`\n\t\t})\n\t\t.join('\\n')\n}\n\nfunction formatPath(entries: (string | number)[]) {\n\tif (entries.length === 0) return 'actual'\n\tconst nodes = [...entries]\n\tif (isIndice(nodes[0])) {\n\t\tnodes.unshift('actual')\n\t}\n\treturn nodes\n\t\t.map((n) => (isIndice(n) ? `[${n}]` : '.' + n))\n\t\t.join('')\n\t\t.slice(1)\n}\n\nfunction isIndice(node: string | number): node is number {\n\treturn typeof node === 'number'\n}\n\nfunction formatValue(value: any) {\n\treturn tersify(value)\n}\n"],"mappings":";;AAGA,SAAgB,oBAAoB,SAAiB;CACpD,OAAO,QACL,KAAK,MAAM;EAEX,OAAO,UADM,WAAW,EAAE,IACN,EAAE,cAAc,YAAY,EAAE,QAAQ,EAAE,iBAAiB,YAAY,EAAE,MAAM;CAClG,CAAC,CAAC,CACD,KAAK,IAAI;AACZ;AAEA,SAAS,WAAW,SAA8B;CACjD,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,MAAM,QAAQ,CAAC,GAAG,OAAO;CACzB,IAAI,SAAS,MAAM,EAAE,GACpB,MAAM,QAAQ,QAAQ;CAEvB,OAAO,MACL,KAAK,MAAO,SAAS,CAAC,IAAI,IAAI,EAAE,KAAK,MAAM,CAAE,CAAC,CAC9C,KAAK,EAAE,CAAC,CACR,MAAM,CAAC;AACV;AAEA,SAAS,SAAS,MAAuC;CACxD,OAAO,OAAO,SAAS;AACxB;AAEA,SAAS,YAAY,OAAY;CAChC,QAAA,GAAO,QAAA,QAAA,CAAQ,KAAK;AACrB"}
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.notThrownMessage = void 0;
4
- const tersify_1 = require("tersify");
1
+ let tersify = require("tersify");
2
+ //#region ts/utils/notThrownMessage.ts
5
3
  function notThrownMessage(value) {
6
- return `Expect function to throw, but it returned '${(0, tersify_1.tersify)(value)}' instead.`;
4
+ return `Expect function to throw, but it returned '${(0, tersify.tersify)(value)}' instead.`;
7
5
  }
6
+ //#endregion
8
7
  exports.notThrownMessage = notThrownMessage;
8
+
9
9
  //# sourceMappingURL=notThrownMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notThrownMessage.js","sourceRoot":"","sources":["../../ts/utils/notThrownMessage.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AAEjC,SAAgB,gBAAgB,CAAC,KAAU;IAC1C,OAAO,8CAA8C,IAAA,iBAAO,EAAC,KAAK,CAAC,YAAY,CAAA;AAChF,CAAC;AAFD,4CAEC"}
1
+ {"version":3,"file":"notThrownMessage.js","names":[],"sources":["../../ts/utils/notThrownMessage.ts"],"sourcesContent":["import { tersify } from 'tersify'\n\nexport function notThrownMessage(value: any) {\n\treturn `Expect function to throw, but it returned '${tersify(value)}' instead.`\n}\n"],"mappings":";;AAEA,SAAgB,iBAAiB,OAAY;CAC5C,OAAO,+CAAA,GAA8C,QAAA,QAAA,CAAQ,KAAK,EAAE;AACrE"}
@@ -1,19 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.notResolvedMessage = exports.notRejectedMessage = void 0;
4
- const tersify_1 = require("tersify");
1
+ let tersify = require("tersify");
2
+ //#region ts/utils/promiseMessages.ts
5
3
  function notRejectedMessage(value) {
6
- return (`Expected promise to reject, but it resolves with ` +
7
- (typeof value === 'string' ? `'${value}'` : (0, tersify_1.tersify)(value, { maxLength: Infinity })));
4
+ return "Expected promise to reject, but it resolves with " + (typeof value === "string" ? `'${value}'` : (0, tersify.tersify)(value, { maxLength: Number.POSITIVE_INFINITY }));
8
5
  }
9
- exports.notRejectedMessage = notRejectedMessage;
10
6
  function notResolvedMessage(error) {
11
- return (`Expected promise to resolve, but it rejects with ` +
12
- (typeof error === 'string'
13
- ? `'${error}'`
14
- : error instanceof Error
15
- ? error
16
- : (0, tersify_1.tersify)(error, { maxLength: Infinity })));
7
+ return "Expected promise to resolve, but it rejects with " + (typeof error === "string" ? `'${error}'` : error instanceof Error ? error : (0, tersify.tersify)(error, { maxLength: Number.POSITIVE_INFINITY }));
17
8
  }
9
+ //#endregion
10
+ exports.notRejectedMessage = notRejectedMessage;
18
11
  exports.notResolvedMessage = notResolvedMessage;
12
+
19
13
  //# sourceMappingURL=promiseMessages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"promiseMessages.js","sourceRoot":"","sources":["../../ts/utils/promiseMessages.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AAEjC,SAAgB,kBAAkB,CAAC,KAAU;IAC5C,OAAO,CACN,mDAAmD;QACnD,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,IAAA,iBAAO,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,CACpF,CAAA;AACF,CAAC;AALD,gDAKC;AAED,SAAgB,kBAAkB,CAAC,KAAU;IAC5C,OAAO,CACN,mDAAmD;QACnD,CAAC,OAAO,KAAK,KAAK,QAAQ;YACzB,CAAC,CAAC,IAAI,KAAK,GAAG;YACd,CAAC,CAAC,KAAK,YAAY,KAAK;gBACxB,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,IAAA,iBAAO,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,CAC3C,CAAA;AACF,CAAC;AATD,gDASC"}
1
+ {"version":3,"file":"promiseMessages.js","names":[],"sources":["../../ts/utils/promiseMessages.ts"],"sourcesContent":["import { tersify } from 'tersify'\n\nexport function notRejectedMessage(value: any) {\n\treturn (\n\t\t'Expected promise to reject, but it resolves with ' +\n\t\t(typeof value === 'string' ? `'${value}'` : tersify(value, { maxLength: Number.POSITIVE_INFINITY }))\n\t)\n}\n\nexport function notResolvedMessage(error: any) {\n\treturn (\n\t\t'Expected promise to resolve, but it rejects with ' +\n\t\t(typeof error === 'string'\n\t\t\t? `'${error}'`\n\t\t\t: error instanceof Error\n\t\t\t\t? error\n\t\t\t\t: tersify(error, { maxLength: Number.POSITIVE_INFINITY }))\n\t)\n}\n"],"mappings":";;AAEA,SAAgB,mBAAmB,OAAY;CAC9C,OACC,uDACC,OAAO,UAAU,WAAW,IAAI,MAAM,MAAA,GAAK,QAAA,QAAA,CAAQ,OAAO,EAAE,WAAW,OAAO,kBAAkB,CAAC;AAEpG;AAEA,SAAgB,mBAAmB,OAAY;CAC9C,OACC,uDACC,OAAO,UAAU,WACf,IAAI,MAAM,KACV,iBAAiB,QAChB,SAAA,GACA,QAAA,QAAA,CAAQ,OAAO,EAAE,WAAW,OAAO,kBAAkB,CAAC;AAE5D"}
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unexpectedErrorMessage = void 0;
4
- const tersify_1 = require("tersify");
5
- const isErrorConstructor_js_1 = require("./isErrorConstructor.js");
1
+ const require_isErrorConstructor = require("./isErrorConstructor.js");
2
+ let tersify = require("tersify");
3
+ //#region ts/utils/unexpectedErrorMessage.ts
6
4
  function unexpectedErrorMessage(actual, expected) {
7
- return `Unexpected error. Expecting '${(0, isErrorConstructor_js_1.isErrorConstructor)(expected) ? expected.name : (0, tersify_1.tersify)(expected)}' but received ${(0, tersify_1.tersify)(actual)}`;
5
+ return `Unexpected error. Expecting '${require_isErrorConstructor.isErrorConstructor(expected) ? expected.name : (0, tersify.tersify)(expected)}' but received ${(0, tersify.tersify)(actual)}`;
8
6
  }
7
+ //#endregion
9
8
  exports.unexpectedErrorMessage = unexpectedErrorMessage;
9
+
10
10
  //# sourceMappingURL=unexpectedErrorMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unexpectedErrorMessage.js","sourceRoot":"","sources":["../../ts/utils/unexpectedErrorMessage.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AAEjC,mEAA4D;AAE5D,SAAgB,sBAAsB,CAAC,MAAW,EAAE,QAAgD;IACnG,OAAO,gCACN,IAAA,0CAAkB,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,iBAAO,EAAC,QAAQ,CAChE,kBAAkB,IAAA,iBAAO,EAAC,MAAM,CAAC,EAAE,CAAA;AACpC,CAAC;AAJD,wDAIC"}
1
+ {"version":3,"file":"unexpectedErrorMessage.js","names":["isErrorConstructor"],"sources":["../../ts/utils/unexpectedErrorMessage.ts"],"sourcesContent":["import { tersify } from 'tersify'\nimport type { ErrorConstructor, ErrorValidator } from '../types.js'\nimport { isErrorConstructor } from './isErrorConstructor.js'\n\nexport function unexpectedErrorMessage(actual: any, expected: ErrorValidator | ErrorConstructor<any>) {\n\treturn `Unexpected error. Expecting '${\n\t\tisErrorConstructor(expected) ? expected.name : tersify(expected)\n\t}' but received ${tersify(actual)}`\n}\n"],"mappings":";;;AAIA,SAAgB,uBAAuB,QAAa,UAAkD;CACrG,OAAO,gCACNA,2BAAAA,mBAAmB,QAAQ,IAAI,SAAS,QAAA,GAAO,QAAA,QAAA,CAAQ,QAAQ,EAC/D,kBAAA,GAAiB,QAAA,QAAA,CAAQ,MAAM;AACjC"}
@@ -0,0 +1,12 @@
1
+ import toPropertyKey from "./toPropertyKey.js";
2
+ //#region \0@oxc-project+runtime@0.147.0/helpers/esm/defineProperty.js
3
+ function _defineProperty(e, r, t) {
4
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
5
+ value: t,
6
+ enumerable: !0,
7
+ configurable: !0,
8
+ writable: !0
9
+ }) : e[r] = t, e;
10
+ }
11
+ //#endregion
12
+ export { _defineProperty as default };
@@ -0,0 +1,14 @@
1
+ import _typeof from "./typeof.js";
2
+ //#region \0@oxc-project+runtime@0.147.0/helpers/esm/toPrimitive.js
3
+ function toPrimitive(t, r) {
4
+ if ("object" != _typeof(t) || !t) return t;
5
+ var e = t[Symbol.toPrimitive];
6
+ if (void 0 !== e) {
7
+ var i = e.call(t, r || "default");
8
+ if ("object" != _typeof(i)) return i;
9
+ throw new TypeError("@@toPrimitive must return a primitive value.");
10
+ }
11
+ return ("string" === r ? String : Number)(t);
12
+ }
13
+ //#endregion
14
+ export { toPrimitive as default };
@@ -0,0 +1,9 @@
1
+ import _typeof from "./typeof.js";
2
+ import toPrimitive from "./toPrimitive.js";
3
+ //#region \0@oxc-project+runtime@0.147.0/helpers/esm/toPropertyKey.js
4
+ function toPropertyKey(t) {
5
+ var i = toPrimitive(t, "string");
6
+ return "symbol" == _typeof(i) ? i : i + "";
7
+ }
8
+ //#endregion
9
+ export { toPropertyKey as default };
@@ -0,0 +1,11 @@
1
+ //#region \0@oxc-project+runtime@0.147.0/helpers/esm/typeof.js
2
+ function _typeof(o) {
3
+ "@babel/helpers - typeof";
4
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
5
+ return typeof o;
6
+ } : function(o) {
7
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
8
+ }, _typeof(o);
9
+ }
10
+ //#endregion
11
+ export { _typeof as default };
@@ -1,41 +1,44 @@
1
- export declare class AssertOrder {
2
- /**
3
- * Gets the current expecting step.
4
- */
5
- get currentStep(): number;
6
- private state;
7
- constructor(plan?: number);
8
- /**
9
- * Asserts the current step is `step`.
10
- * @param step expected step.
11
- */
12
- is(step: number): void;
13
- /**
14
- * Asserts the current step is not `step`.
15
- * @param step not expected step.
16
- */
17
- not(step: number): void;
18
- /**
19
- * Reset to specified step.
20
- */
21
- jump(step: number): void;
22
- /**
23
- * Move to next step.
24
- */
25
- move(): void;
26
- /**
27
- * Asserts the specified step will run once.
28
- */
29
- once(step: number): void;
30
- on(step: number, assert: (step: number) => void): void;
31
- atLeastOnce(step: number): number;
32
- any(steps: number[], handler?: (step: number) => void): number;
33
- onAny(steps: number[], ...asserts: Array<(step: number) => unknown>): void;
34
- end(timeout: number): Promise<number>;
35
- end(): number;
36
- exactly(step: number, times: number): number;
37
- wait(step: number): Promise<void>;
38
- wait(step: number, callback: () => void): void;
39
- private assert;
1
+ //#region ts/assert-order/AssertOrder.d.ts
2
+ declare class AssertOrder {
3
+ /**
4
+ * Gets the current expecting step.
5
+ */
6
+ get currentStep(): number;
7
+ private state;
8
+ constructor(plan?: number);
9
+ /**
10
+ * Asserts the current step is `step`.
11
+ * @param step expected step.
12
+ */
13
+ is(step: number): void;
14
+ /**
15
+ * Asserts the current step is not `step`.
16
+ * @param step not expected step.
17
+ */
18
+ not(step: number): void;
19
+ /**
20
+ * Reset to specified step.
21
+ */
22
+ jump(step: number): void;
23
+ /**
24
+ * Move to next step.
25
+ */
26
+ move(): void;
27
+ /**
28
+ * Asserts the specified step will run once.
29
+ */
30
+ once(step: number): void;
31
+ on(step: number, assert: (step: number) => void): void;
32
+ atLeastOnce(step: number): number;
33
+ any(steps: number[], handler?: (step: number) => void): number;
34
+ onAny(steps: number[], ...asserts: Array<(step: number) => unknown>): void;
35
+ end(timeout: number): Promise<number>;
36
+ end(): number;
37
+ exactly(step: number, times: number): number;
38
+ wait(step: number): Promise<void>;
39
+ wait(step: number, callback: () => void): void;
40
+ private assert;
40
41
  }
42
+ //#endregion
43
+ export { AssertOrder };
41
44
  //# sourceMappingURL=AssertOrder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssertOrder.d.ts","sourceRoot":"","sources":["../../ts/assert-order/AssertOrder.ts"],"names":[],"mappings":"AAMA,qBAAa,WAAW;IACvB;;OAEG;IACH,IAAI,WAAW,WAEd;IAED,OAAO,CAAC,KAAK,CAAc;gBACf,IAAI,CAAC,EAAE,MAAM;IAIzB;;;OAGG;IACH,EAAE,CAAC,IAAI,EAAE,MAAM;IAIf;;;OAGG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM;IAMhB;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM;IAIjB;;OAEG;IACH,IAAI;IAIJ;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM;IAKjB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI;IAM/C,WAAW,CAAC,IAAI,EAAE,MAAM;IAUxB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI;IAUrD,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAkBnE,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACrC,GAAG,IAAI,MAAM;IAmBb,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAWnC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IACjC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAQ9C,OAAO,CAAC,MAAM;CAKd"}
1
+ {"version":3,"file":"AssertOrder.d.ts","names":[],"sources":["../../ts/assert-order/AssertOrder.ts"],"mappings":";cAMa;;;;MAIR;UAII;EACR,YAAY;;;;;EAQZ,GAAG;;;;;EAQH,IAAI;;;;EASJ,KAAK;;;;EAOL;;;;EAOA,KAAK;EAKL,GAAG,cAAc,SAAS;EAM1B,YAAY;EAYZ,IAAI,iBAAiB,WAAW;EAUhC,MAAM,oBAAoB,SAAS,OAAO;EAkB1C,IAAI,kBAAkB;EACtB;EAmBA,QAAQ,cAAc;EAWtB,KAAK,eAAe;EACpB,KAAK,cAAc;UAQX"}