bupkis 0.7.2 → 0.9.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.
- package/CHANGELOG.md +15 -0
- package/README.md +19 -2
- package/dist/commonjs/assertion/assertion-async.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion-async.js +37 -7
- package/dist/commonjs/assertion/assertion-async.js.map +1 -1
- package/dist/commonjs/assertion/assertion-sync.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion-sync.js +32 -8
- package/dist/commonjs/assertion/assertion-sync.js.map +1 -1
- package/dist/commonjs/assertion/assertion-types.d.ts +37 -31
- package/dist/commonjs/assertion/assertion-types.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion-types.js +0 -32
- package/dist/commonjs/assertion/assertion-types.js.map +1 -1
- package/dist/commonjs/assertion/assertion.d.ts +3 -21
- package/dist/commonjs/assertion/assertion.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion.js +42 -27
- package/dist/commonjs/assertion/assertion.js.map +1 -1
- package/dist/commonjs/assertion/create.d.ts +2 -0
- package/dist/commonjs/assertion/create.d.ts.map +1 -1
- package/dist/commonjs/assertion/create.js +38 -42
- package/dist/commonjs/assertion/create.js.map +1 -1
- package/dist/commonjs/assertion/impl/assertion-util.d.ts +16 -4
- package/dist/commonjs/assertion/impl/assertion-util.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/assertion-util.js +20 -15
- package/dist/commonjs/assertion/impl/assertion-util.js.map +1 -1
- package/dist/commonjs/assertion/impl/async-parametric.d.ts +63 -11
- package/dist/commonjs/assertion/impl/async-parametric.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/async-parametric.js +89 -52
- package/dist/commonjs/assertion/impl/async-parametric.js.map +1 -1
- package/dist/commonjs/assertion/impl/async.d.ts +116 -12
- package/dist/commonjs/assertion/impl/async.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/async.js +1 -1
- package/dist/commonjs/assertion/impl/sync-basic.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/sync-basic.js +6 -4
- package/dist/commonjs/assertion/impl/sync-basic.js.map +1 -1
- package/dist/commonjs/assertion/impl/sync-collection.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/sync-collection.js +24 -14
- package/dist/commonjs/assertion/impl/sync-collection.js.map +1 -1
- package/dist/commonjs/assertion/impl/sync-esoteric.d.ts +1 -5
- package/dist/commonjs/assertion/impl/sync-esoteric.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/sync-esoteric.js +11 -13
- package/dist/commonjs/assertion/impl/sync-esoteric.js.map +1 -1
- package/dist/commonjs/assertion/impl/sync-parametric.d.ts +27 -7
- package/dist/commonjs/assertion/impl/sync-parametric.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/sync-parametric.js +75 -51
- package/dist/commonjs/assertion/impl/sync-parametric.js.map +1 -1
- package/dist/commonjs/assertion/impl/sync.d.ts +54 -22
- package/dist/commonjs/assertion/impl/sync.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/sync.js +1 -1
- package/dist/commonjs/assertion/impl/sync.js.map +1 -1
- package/dist/commonjs/assertion/index.d.ts +1 -1
- package/dist/commonjs/assertion/index.d.ts.map +1 -1
- package/dist/commonjs/assertion/index.js +0 -1
- package/dist/commonjs/assertion/index.js.map +1 -1
- package/dist/commonjs/assertion/slotify.d.ts +1 -13
- package/dist/commonjs/assertion/slotify.d.ts.map +1 -1
- package/dist/commonjs/assertion/slotify.js +49 -16
- package/dist/commonjs/assertion/slotify.js.map +1 -1
- package/dist/commonjs/bootstrap.d.ts +85 -17
- package/dist/commonjs/bootstrap.d.ts.map +1 -1
- package/dist/commonjs/bootstrap.js +1 -0
- package/dist/commonjs/bootstrap.js.map +1 -1
- package/dist/commonjs/diff.d.ts +51 -0
- package/dist/commonjs/diff.d.ts.map +1 -0
- package/dist/commonjs/diff.js +279 -0
- package/dist/commonjs/diff.js.map +1 -0
- package/dist/commonjs/error.d.ts +37 -18
- package/dist/commonjs/error.d.ts.map +1 -1
- package/dist/commonjs/error.js +44 -30
- package/dist/commonjs/error.js.map +1 -1
- package/dist/commonjs/expect.d.ts.map +1 -1
- package/dist/commonjs/expect.js +131 -78
- package/dist/commonjs/expect.js.map +1 -1
- package/dist/commonjs/guards.d.ts +24 -10
- package/dist/commonjs/guards.d.ts.map +1 -1
- package/dist/commonjs/guards.js +56 -39
- package/dist/commonjs/guards.js.map +1 -1
- package/dist/commonjs/index.d.ts +85 -17
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/internal-schema.d.ts +25 -0
- package/dist/commonjs/internal-schema.d.ts.map +1 -0
- package/dist/commonjs/internal-schema.js +209 -0
- package/dist/commonjs/internal-schema.js.map +1 -0
- package/dist/commonjs/schema.d.ts.map +1 -1
- package/dist/commonjs/schema.js +3 -2
- package/dist/commonjs/schema.js.map +1 -1
- package/dist/commonjs/use.js +22 -8
- package/dist/commonjs/use.js.map +1 -1
- package/dist/commonjs/util.d.ts +1 -0
- package/dist/commonjs/util.d.ts.map +1 -1
- package/dist/commonjs/util.js +14 -10
- package/dist/commonjs/util.js.map +1 -1
- package/dist/commonjs/value-to-schema.d.ts +1 -0
- package/dist/commonjs/value-to-schema.d.ts.map +1 -1
- package/dist/commonjs/value-to-schema.js +19 -12
- package/dist/commonjs/value-to-schema.js.map +1 -1
- package/dist/esm/assertion/assertion-async.d.ts.map +1 -1
- package/dist/esm/assertion/assertion-async.js +37 -7
- package/dist/esm/assertion/assertion-async.js.map +1 -1
- package/dist/esm/assertion/assertion-sync.d.ts.map +1 -1
- package/dist/esm/assertion/assertion-sync.js +32 -8
- package/dist/esm/assertion/assertion-sync.js.map +1 -1
- package/dist/esm/assertion/assertion-types.d.ts +37 -31
- package/dist/esm/assertion/assertion-types.d.ts.map +1 -1
- package/dist/esm/assertion/assertion-types.js +1 -31
- package/dist/esm/assertion/assertion-types.js.map +1 -1
- package/dist/esm/assertion/assertion.d.ts +3 -21
- package/dist/esm/assertion/assertion.d.ts.map +1 -1
- package/dist/esm/assertion/assertion.js +42 -27
- package/dist/esm/assertion/assertion.js.map +1 -1
- package/dist/esm/assertion/create.d.ts +2 -0
- package/dist/esm/assertion/create.d.ts.map +1 -1
- package/dist/esm/assertion/create.js +37 -41
- package/dist/esm/assertion/create.js.map +1 -1
- package/dist/esm/assertion/impl/assertion-util.d.ts +16 -4
- package/dist/esm/assertion/impl/assertion-util.d.ts.map +1 -1
- package/dist/esm/assertion/impl/assertion-util.js +20 -15
- package/dist/esm/assertion/impl/assertion-util.js.map +1 -1
- package/dist/esm/assertion/impl/async-parametric.d.ts +63 -11
- package/dist/esm/assertion/impl/async-parametric.d.ts.map +1 -1
- package/dist/esm/assertion/impl/async-parametric.js +89 -52
- package/dist/esm/assertion/impl/async-parametric.js.map +1 -1
- package/dist/esm/assertion/impl/async.d.ts +116 -12
- package/dist/esm/assertion/impl/async.d.ts.map +1 -1
- package/dist/esm/assertion/impl/async.js +2 -2
- package/dist/esm/assertion/impl/async.js.map +1 -1
- package/dist/esm/assertion/impl/sync-basic.d.ts.map +1 -1
- package/dist/esm/assertion/impl/sync-basic.js +6 -4
- package/dist/esm/assertion/impl/sync-basic.js.map +1 -1
- package/dist/esm/assertion/impl/sync-collection.d.ts.map +1 -1
- package/dist/esm/assertion/impl/sync-collection.js +24 -14
- package/dist/esm/assertion/impl/sync-collection.js.map +1 -1
- package/dist/esm/assertion/impl/sync-esoteric.d.ts +1 -5
- package/dist/esm/assertion/impl/sync-esoteric.d.ts.map +1 -1
- package/dist/esm/assertion/impl/sync-esoteric.js +11 -13
- package/dist/esm/assertion/impl/sync-esoteric.js.map +1 -1
- package/dist/esm/assertion/impl/sync-parametric.d.ts +27 -7
- package/dist/esm/assertion/impl/sync-parametric.d.ts.map +1 -1
- package/dist/esm/assertion/impl/sync-parametric.js +75 -51
- package/dist/esm/assertion/impl/sync-parametric.js.map +1 -1
- package/dist/esm/assertion/impl/sync.d.ts +54 -22
- package/dist/esm/assertion/impl/sync.d.ts.map +1 -1
- package/dist/esm/assertion/impl/sync.js +2 -2
- package/dist/esm/assertion/impl/sync.js.map +1 -1
- package/dist/esm/assertion/index.d.ts +1 -1
- package/dist/esm/assertion/index.d.ts.map +1 -1
- package/dist/esm/assertion/index.js +0 -1
- package/dist/esm/assertion/index.js.map +1 -1
- package/dist/esm/assertion/slotify.d.ts +1 -13
- package/dist/esm/assertion/slotify.d.ts.map +1 -1
- package/dist/esm/assertion/slotify.js +50 -17
- package/dist/esm/assertion/slotify.js.map +1 -1
- package/dist/esm/bootstrap.d.ts +85 -17
- package/dist/esm/bootstrap.d.ts.map +1 -1
- package/dist/esm/bootstrap.js +1 -0
- package/dist/esm/bootstrap.js.map +1 -1
- package/dist/esm/diff.d.ts +51 -0
- package/dist/esm/diff.d.ts.map +1 -0
- package/dist/esm/diff.js +273 -0
- package/dist/esm/diff.js.map +1 -0
- package/dist/esm/error.d.ts +37 -18
- package/dist/esm/error.d.ts.map +1 -1
- package/dist/esm/error.js +41 -27
- package/dist/esm/error.js.map +1 -1
- package/dist/esm/expect.d.ts.map +1 -1
- package/dist/esm/expect.js +133 -80
- package/dist/esm/expect.js.map +1 -1
- package/dist/esm/guards.d.ts +24 -10
- package/dist/esm/guards.d.ts.map +1 -1
- package/dist/esm/guards.js +52 -36
- package/dist/esm/guards.js.map +1 -1
- package/dist/esm/index.d.ts +85 -17
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/internal-schema.d.ts +25 -0
- package/dist/esm/internal-schema.d.ts.map +1 -0
- package/dist/esm/internal-schema.js +203 -0
- package/dist/esm/internal-schema.js.map +1 -0
- package/dist/esm/schema.d.ts.map +1 -1
- package/dist/esm/schema.js +3 -2
- package/dist/esm/schema.js.map +1 -1
- package/dist/esm/use.js +19 -6
- package/dist/esm/use.js.map +1 -1
- package/dist/esm/util.d.ts +1 -0
- package/dist/esm/util.d.ts.map +1 -1
- package/dist/esm/util.js +14 -10
- package/dist/esm/util.js.map +1 -1
- package/dist/esm/value-to-schema.d.ts +1 -0
- package/dist/esm/value-to-schema.d.ts.map +1 -1
- package/dist/esm/value-to-schema.js +20 -13
- package/dist/esm/value-to-schema.js.map +1 -1
- package/package.json +29 -11
- package/src/assertion/assertion-async.ts +42 -14
- package/src/assertion/assertion-sync.ts +40 -17
- package/src/assertion/assertion-types.ts +55 -45
- package/src/assertion/assertion.ts +49 -32
- package/src/assertion/create.ts +46 -65
- package/src/assertion/impl/assertion-util.ts +31 -18
- package/src/assertion/impl/async-parametric.ts +93 -52
- package/src/assertion/impl/async.ts +2 -2
- package/src/assertion/impl/sync-basic.ts +7 -4
- package/src/assertion/impl/sync-collection.ts +34 -14
- package/src/assertion/impl/sync-esoteric.ts +17 -13
- package/src/assertion/impl/sync-parametric.ts +79 -52
- package/src/assertion/impl/sync.ts +2 -2
- package/src/assertion/index.ts +1 -1
- package/src/assertion/slotify.ts +67 -21
- package/src/bootstrap.ts +1 -0
- package/src/diff.ts +343 -0
- package/src/error.ts +66 -31
- package/src/expect.ts +195 -129
- package/src/guards.ts +74 -48
- package/src/internal-schema.ts +246 -0
- package/src/schema.ts +4 -2
- package/src/use.ts +21 -7
- package/src/util.ts +15 -12
- package/src/value-to-schema.ts +21 -13
|
@@ -19,9 +19,12 @@ 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;
|
|
27
|
+
const { isArray } = Array;
|
|
25
28
|
/**
|
|
26
29
|
* Modified charmap for {@link slug} to use underscores to replace hyphens (`-`;
|
|
27
30
|
* and for hyphens to replace everything else that needs replacing) and `<` with
|
|
@@ -56,6 +59,14 @@ class BupkisAssertion {
|
|
|
56
59
|
* @returns String representation
|
|
57
60
|
*/
|
|
58
61
|
toString() {
|
|
62
|
+
/**
|
|
63
|
+
* Expands a Zod type into a human-readable string representation.
|
|
64
|
+
*
|
|
65
|
+
* @function
|
|
66
|
+
* @param zodType The Zod type to expand
|
|
67
|
+
* @param wrapCurlies Whether to wrap the result in curly braces
|
|
68
|
+
* @returns String representation of the Zod type
|
|
69
|
+
*/
|
|
59
70
|
const expand = (zodType, wrapCurlies = false) => {
|
|
60
71
|
const def = 'def' in zodType ? zodType.def : zodType._zod.def;
|
|
61
72
|
let repr = '';
|
|
@@ -84,7 +95,7 @@ class BupkisAssertion {
|
|
|
84
95
|
repr = `{${expand(def.innerType)}}`;
|
|
85
96
|
break;
|
|
86
97
|
case 'enum':
|
|
87
|
-
repr = `${
|
|
98
|
+
repr = `${keys(def.entries).join(' / ')}`;
|
|
88
99
|
break;
|
|
89
100
|
case 'intersection':
|
|
90
101
|
repr = `${expand(def.left)} & ${expand(def.right)}`;
|
|
@@ -128,24 +139,11 @@ class BupkisAssertion {
|
|
|
128
139
|
return wrapCurlies ? `{${repr}}` : repr;
|
|
129
140
|
};
|
|
130
141
|
return `"${this.slots
|
|
131
|
-
.map((slot) =>
|
|
142
|
+
.map((slot) => hasOwn(metadata_js_1.BupkisRegistry.get(slot) ?? {}, constant_js_1.kStringLiteral)
|
|
132
143
|
? expand(slot)
|
|
133
144
|
: expand(slot, true))
|
|
134
145
|
.join(' ')}"`;
|
|
135
146
|
}
|
|
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
147
|
/**
|
|
150
148
|
* Translates a {@link z.ZodError} into an {@link AssertionError} with a
|
|
151
149
|
* human-friendly message.
|
|
@@ -160,19 +158,36 @@ class BupkisAssertion {
|
|
|
160
158
|
* @returns New `AssertionError`
|
|
161
159
|
*/
|
|
162
160
|
fromZodError(zodError, stackStartFn, values) {
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
161
|
+
const subject = isArray(values) ? values[0] : values;
|
|
162
|
+
const { actual, expected } = (0, diff_js_1.extractDiffValues)(zodError, subject);
|
|
163
|
+
// Only use custom message if we could extract diff values
|
|
164
|
+
if ((0, diff_js_1.shouldGenerateDiff)(actual, expected)) {
|
|
165
|
+
// Use jest-diff to generate rich, colored diff output
|
|
166
|
+
const diffOutput = (0, diff_js_1.generateDiff)(expected, actual, {
|
|
167
|
+
aAnnotation: 'expected',
|
|
168
|
+
bAnnotation: 'actual',
|
|
169
|
+
expand: false,
|
|
170
|
+
includeChangeCounts: true,
|
|
171
|
+
});
|
|
172
|
+
const message = diffOutput
|
|
173
|
+
? `Assertion ${this} failed:\n${diffOutput}`
|
|
174
|
+
: `Assertion ${this} failed: values are not equal`;
|
|
175
|
+
return new error_js_1.AssertionError({
|
|
176
|
+
actual,
|
|
177
|
+
expected,
|
|
178
|
+
message,
|
|
179
|
+
stackStartFn,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
// Fall back to Zod's prettified error message
|
|
184
|
+
const pretty = v4_1.z.prettifyError(zodError).slice(2);
|
|
185
|
+
return new error_js_1.AssertionError({
|
|
186
|
+
actual: subject,
|
|
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) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertion.js","sourceRoot":"","sources":["../../../src/assertion/assertion.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;AAEH,kDAAgC;AAChC,gDAAwB;AAExB,+BAA+B;AAC/B,+BAA2B;AAE3B,gDAAgD;AAChD,0CAAmE;AACnE,gDAAgD;
|
|
1
|
+
{"version":3,"file":"assertion.js","sourceRoot":"","sources":["../../../src/assertion/assertion.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;AAEH,kDAAgC;AAChC,gDAAwB;AAExB,+BAA+B;AAC/B,+BAA2B;AAE3B,gDAAgD;AAChD,wCAIoB;AACpB,0CAAmE;AACnE,gDAAgD;AAUhD,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,kBAAkB,CAAC,CAAC;AAC9C,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;AAChC,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAC1B;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,EAAE,GAAG,cAAI,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;AAEtE;;GAEG;AACU,QAAA,yBAAyB,GAAG,IAAI,OAAO,EAGjD,CAAC;AAEJ;;GAEG;AACH,MAAsB,eAAe;IASxB;IACA;IACA;IALF,EAAE,CAAS;IAEpB,YACW,KAAY,EACZ,KAAY,EACZ,IAAU;QAFV,UAAK,GAAL,KAAK,CAAO;QACZ,UAAK,GAAL,KAAK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,CAAC;oBAC1B,OAAO;wBACL,OAAO,EAAE,KAAK;qBACf,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;gBAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,MAA2B,CAAC;gBACjD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC;oBACnC,OAAO;wBACL,OAAO,EAAE,KAAK;qBACf,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,oBAAoB;gBACpB,MAAM,IAAI,+BAAoB,CAC5B,6BAA6B,SAAS,eAAe,IAAA,cAAO,EAAC,MAAM,CAAC,EAAE,EACtE,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB,CAAC;YACJ,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACK,mBAAmB;QACzB,MAAM,QAAQ,GAAG,IAAA,cAAI,EAAC,GAAG,IAAI,EAAE,EAAE;YAC/B,OAAO,EAAE,YAAY;SACtB,CAAC,CAAC;QAEH,qDAAqD;QACrD,2DAA2D;QAC3D,MAAM,SAAS,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;QAE/D,OAAO,GAAG,QAAQ,IAAI,SAAS,EAAE,CAAC;IACpC,CAAC;CACF;AA1PD,0CA0PC"}
|
|
@@ -69,6 +69,7 @@ import { type CreateAssertionFn, type CreateAsyncAssertionFn } from './assertion
|
|
|
69
69
|
/**
|
|
70
70
|
* {@inheritDoc CreateAssertionFn}
|
|
71
71
|
*
|
|
72
|
+
* @function
|
|
72
73
|
* @throws {TypeError} Invalid assertion implementation type
|
|
73
74
|
* @group Assertion Creation
|
|
74
75
|
*/
|
|
@@ -76,6 +77,7 @@ export declare const createAssertion: CreateAssertionFn;
|
|
|
76
77
|
/**
|
|
77
78
|
* {@inheritDoc CreateAsyncAssertionFn}
|
|
78
79
|
*
|
|
80
|
+
* @function
|
|
79
81
|
* @throws {TypeError} Invalid assertion implementation type
|
|
80
82
|
* @group Assertion Creation
|
|
81
83
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/assertion/create.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/assertion/create.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AA0BH,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,sBAAsB,CAAC;AAI9B;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,iBA0C7B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,sBAgDlC,CAAC"}
|
|
@@ -71,90 +71,86 @@ exports.createAsyncAssertion = exports.createAssertion = void 0;
|
|
|
71
71
|
const v4_1 = require("zod/v4");
|
|
72
72
|
const error_js_1 = require("../error.js");
|
|
73
73
|
const guards_js_1 = require("../guards.js");
|
|
74
|
+
const internal_schema_js_1 = require("../internal-schema.js");
|
|
74
75
|
const assertion_async_js_1 = require("./assertion-async.js");
|
|
75
76
|
const assertion_sync_js_1 = require("./assertion-sync.js");
|
|
76
|
-
const assertion_types_js_1 = require("./assertion-types.js");
|
|
77
77
|
const assertion_js_1 = require("./assertion.js");
|
|
78
78
|
const slotify_js_1 = require("./slotify.js");
|
|
79
79
|
/**
|
|
80
80
|
* {@inheritDoc CreateAssertionFn}
|
|
81
81
|
*
|
|
82
|
+
* @function
|
|
82
83
|
* @throws {TypeError} Invalid assertion implementation type
|
|
83
84
|
* @group Assertion Creation
|
|
84
85
|
*/
|
|
85
86
|
const createAssertion = (parts, impl, metadata) => {
|
|
86
|
-
|
|
87
|
-
throw new error_js_1.AssertionImplementationError('First parameter must be an array');
|
|
88
|
-
}
|
|
89
|
-
if (parts.length === 0) {
|
|
90
|
-
throw new error_js_1.AssertionImplementationError('At least one value is required for an assertion');
|
|
91
|
-
}
|
|
92
|
-
if (!parts.every((part) => (0, guards_js_1.isString)(part) || Array.isArray(part) || (0, guards_js_1.isZodType)(part))) {
|
|
93
|
-
throw new error_js_1.AssertionImplementationError('All assertion parts must be strings or Zod schemas');
|
|
94
|
-
}
|
|
95
|
-
if (!impl) {
|
|
96
|
-
throw new error_js_1.AssertionImplementationError('An assertion implementation is required');
|
|
97
|
-
}
|
|
87
|
+
// Validate inputs using Zod schema
|
|
98
88
|
try {
|
|
99
|
-
|
|
100
|
-
if ((0, guards_js_1.isZodType)(impl)) {
|
|
101
|
-
const assertion = new assertion_sync_js_1.BupkisAssertionSchemaSync(parts, slots, impl);
|
|
102
|
-
if (metadata) {
|
|
103
|
-
assertion_js_1.AssertionMetadataRegistry.set(assertion, metadata);
|
|
104
|
-
}
|
|
105
|
-
return assertion;
|
|
106
|
-
}
|
|
107
|
-
else if ((0, guards_js_1.isFunction)(impl)) {
|
|
108
|
-
const assertion = new assertion_sync_js_1.BupkisAssertionFunctionSync(parts, slots, impl);
|
|
109
|
-
if (metadata) {
|
|
110
|
-
assertion_js_1.AssertionMetadataRegistry.set(assertion, metadata);
|
|
111
|
-
}
|
|
112
|
-
return assertion;
|
|
113
|
-
}
|
|
89
|
+
internal_schema_js_1.CreateAssertionInputSchema.parse([parts, impl, metadata]);
|
|
114
90
|
}
|
|
115
91
|
catch (err) {
|
|
116
92
|
if (err instanceof v4_1.z.ZodError) {
|
|
117
|
-
throw new error_js_1.AssertionImplementationError(`
|
|
93
|
+
throw new error_js_1.AssertionImplementationError(`Invalid input parameters: ${v4_1.z.prettifyError(err)}`, { cause: err });
|
|
118
94
|
}
|
|
119
|
-
|
|
95
|
+
/* c8 ignore next */
|
|
96
|
+
throw err;
|
|
97
|
+
}
|
|
98
|
+
const slots = (0, slotify_js_1.slotify)(parts);
|
|
99
|
+
if ((0, guards_js_1.isZodType)(impl)) {
|
|
100
|
+
const assertion = new assertion_sync_js_1.BupkisAssertionSchemaSync(parts, slots, impl);
|
|
101
|
+
if (metadata) {
|
|
102
|
+
assertion_js_1.AssertionMetadataRegistry.set(assertion, metadata);
|
|
103
|
+
}
|
|
104
|
+
return assertion;
|
|
120
105
|
}
|
|
106
|
+
else if ((0, guards_js_1.isFunction)(impl)) {
|
|
107
|
+
const assertion = new assertion_sync_js_1.BupkisAssertionFunctionSync(parts, slots, impl);
|
|
108
|
+
if (metadata) {
|
|
109
|
+
assertion_js_1.AssertionMetadataRegistry.set(assertion, metadata);
|
|
110
|
+
}
|
|
111
|
+
return assertion;
|
|
112
|
+
}
|
|
113
|
+
// should be impossible if CreateAssertionInputSchema is correct
|
|
114
|
+
/* c8 ignore next */
|
|
121
115
|
throw new error_js_1.AssertionImplementationError('Assertion implementation must be a function, Zod schema or Zod schema factory');
|
|
122
116
|
};
|
|
123
117
|
exports.createAssertion = createAssertion;
|
|
124
118
|
/**
|
|
125
119
|
* {@inheritDoc CreateAsyncAssertionFn}
|
|
126
120
|
*
|
|
121
|
+
* @function
|
|
127
122
|
* @throws {TypeError} Invalid assertion implementation type
|
|
128
123
|
* @group Assertion Creation
|
|
129
124
|
*/
|
|
130
125
|
const createAsyncAssertion = (parts, impl, metadata) => {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
if (parts.length === 0) {
|
|
135
|
-
throw new error_js_1.AssertionImplementationError('At least one value is required for an assertion');
|
|
136
|
-
}
|
|
137
|
-
if (!parts.every((part) => (0, guards_js_1.isString)(part) || Array.isArray(part) || (0, guards_js_1.isZodType)(part))) {
|
|
138
|
-
throw new error_js_1.AssertionImplementationError('All assertion parts must be strings or Zod schemas');
|
|
126
|
+
// Validate inputs using Zod schema
|
|
127
|
+
try {
|
|
128
|
+
internal_schema_js_1.CreateAssertionInputSchemaAsync.parse([parts, impl, metadata]);
|
|
139
129
|
}
|
|
140
|
-
|
|
141
|
-
|
|
130
|
+
catch (err) {
|
|
131
|
+
if (err instanceof v4_1.z.ZodError) {
|
|
132
|
+
throw new error_js_1.AssertionImplementationError(`Invalid input parameters: ${v4_1.z.prettifyError(err)}`, { cause: err });
|
|
133
|
+
}
|
|
134
|
+
/* c8 ignore next */
|
|
135
|
+
throw err;
|
|
142
136
|
}
|
|
143
137
|
const slots = (0, slotify_js_1.slotify)(parts);
|
|
144
138
|
if ((0, guards_js_1.isZodType)(impl)) {
|
|
145
139
|
const assertion = new assertion_async_js_1.BupkisAssertionSchemaAsync(parts, slots, impl);
|
|
146
140
|
if (metadata) {
|
|
147
|
-
assertion_js_1.AssertionMetadataRegistry.set(assertion,
|
|
141
|
+
assertion_js_1.AssertionMetadataRegistry.set(assertion, internal_schema_js_1.AssertionMetadataSchema.parse(metadata));
|
|
148
142
|
}
|
|
149
143
|
return assertion;
|
|
150
144
|
}
|
|
151
145
|
else if ((0, guards_js_1.isFunction)(impl)) {
|
|
152
146
|
const assertion = new assertion_async_js_1.BupkisAssertionFunctionAsync(parts, slots, impl);
|
|
153
147
|
if (metadata) {
|
|
154
|
-
assertion_js_1.AssertionMetadataRegistry.set(assertion,
|
|
148
|
+
assertion_js_1.AssertionMetadataRegistry.set(assertion, internal_schema_js_1.AssertionMetadataSchema.parse(metadata));
|
|
155
149
|
}
|
|
156
150
|
return assertion;
|
|
157
151
|
}
|
|
152
|
+
// should be impossible if CreateAssertionInputSchemaAsync is correct
|
|
153
|
+
/* c8 ignore next */
|
|
158
154
|
throw new error_js_1.AssertionImplementationError('Assertion implementation must be a function, Zod schema or Zod schema factory');
|
|
159
155
|
};
|
|
160
156
|
exports.createAsyncAssertion = createAsyncAssertion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/assertion/create.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;;;AAEH,+BAA2B;AAS3B,0CAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/assertion/create.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;;;AAEH,+BAA2B;AAS3B,0CAA2D;AAC3D,4CAAqD;AACrD,8DAI+B;AAC/B,6DAG8B;AAC9B,2DAG6B;AAK7B,iDAA2D;AAC3D,6CAAuC;AAEvC;;;;;;GAMG;AACI,MAAM,eAAe,GAAsB,CAIhD,KAAY,EACZ,IAAU,EACV,QAA4B,EAC5B,EAAE;IACF,mCAAmC;IACnC,IAAI,CAAC;QACH,+CAA0B,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC5D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,MAAC,CAAC,QAAQ,EAAE,CAAC;YAC9B,MAAM,IAAI,uCAA4B,CACpC,6BAA6B,MAAC,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,EACnD,EAAE,KAAK,EAAE,GAAG,EAAE,CACf,CAAC;QACJ,CAAC;QACD,oBAAoB;QACpB,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,MAAM,KAAK,GAAG,IAAA,oBAAO,EAAQ,KAAK,CAAC,CAAC;IAEpC,IAAI,IAAA,qBAAS,EAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,SAAS,GAAG,IAAI,6CAAyB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACpE,IAAI,QAA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AAC,CAAC;QACrE,IAAI,QAAQ,EAAE,CAAC;YACb,wCAAyB,CAAC,GAAG,CAC3B,SAAS,EACT,4CAAuB,CAAC,KAAK,CAAC,QAAQ,CAAC,CACxC,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;SAAM,IAAI,IAAA,sBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;QAC5B,MAAM,SAAS,GAAG,IAAI,iDAA4B,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACvE,IAAI,QAAQ,EAAE,CAAC;YACb,wCAAyB,CAAC,GAAG,CAC3B,SAAS,EACT,4CAAuB,CAAC,KAAK,CAAC,QAAQ,CAAC,CACxC,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,qEAAqE;IACrE,oBAAoB;IACpB,MAAM,IAAI,uCAA4B,CACpC,+EAA+E,CAChF,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,oBAAoB,wBAgD/B"}
|
|
@@ -4,21 +4,33 @@
|
|
|
4
4
|
* @internal
|
|
5
5
|
* @packageDocumentation
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* Executes & traps a `Promise` rejected from an async function, capturing the
|
|
9
|
+
* error.
|
|
10
|
+
*
|
|
11
|
+
* @function
|
|
12
|
+
* @param fn The function to execute that may throw an error or return a
|
|
13
|
+
* `Promise`
|
|
14
|
+
* @returns Rejection or whatever was fulfilled
|
|
15
|
+
*/
|
|
16
|
+
export declare const trapAsyncFnError: (fn: () => unknown) => Promise<TrapResult>;
|
|
7
17
|
/**
|
|
8
18
|
* Awaits & traps a Promise, capturing any rejection error.
|
|
9
19
|
*
|
|
20
|
+
* @function
|
|
10
21
|
* @param promise The `Promise` to trap
|
|
11
|
-
* @returns
|
|
22
|
+
* @returns Result object
|
|
12
23
|
*/
|
|
13
|
-
export declare const trapPromiseError: (promise: PromiseLike<unknown>) => Promise<
|
|
24
|
+
export declare const trapPromiseError: (promise: PromiseLike<unknown>) => Promise<TrapResult>;
|
|
14
25
|
/**
|
|
15
26
|
* Executes & traps a synchronous function that may throw, capturing any thrown
|
|
16
27
|
* error and discarding the result.
|
|
17
28
|
*
|
|
18
29
|
* @remarks
|
|
19
30
|
* Avoids throwing `undefined` for some reason.
|
|
31
|
+
* @function
|
|
20
32
|
* @param fn Function to execute
|
|
21
|
-
* @returns
|
|
33
|
+
* @returns Result object
|
|
22
34
|
*/
|
|
23
|
-
export declare const trapError: (fn: () => unknown) =>
|
|
35
|
+
export declare const trapError: (fn: () => unknown) => TrapResult;
|
|
24
36
|
//# sourceMappingURL=assertion-util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertion-util.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/assertion-util.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"assertion-util.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/assertion-util.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAC3B,IAAI,MAAM,OAAO,KAChB,OAAO,CAAC,UAAU,CASpB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,WAAW,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC,UAAU,CAOpB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,GAAI,IAAI,MAAM,OAAO,KAAG,UAO7C,CAAC"}
|
|
@@ -11,31 +11,37 @@ exports.trapError = exports.trapPromiseError = exports.trapAsyncFnError = void 0
|
|
|
11
11
|
* Executes & traps a `Promise` rejected from an async function, capturing the
|
|
12
12
|
* error.
|
|
13
13
|
*
|
|
14
|
+
* @function
|
|
14
15
|
* @param fn The function to execute that may throw an error or return a
|
|
15
16
|
* `Promise`
|
|
16
|
-
* @returns Rejection
|
|
17
|
+
* @returns Rejection or whatever was fulfilled
|
|
17
18
|
*/
|
|
18
19
|
const trapAsyncFnError = async (fn) => {
|
|
19
20
|
try {
|
|
20
|
-
await fn();
|
|
21
|
+
const result = await fn();
|
|
22
|
+
return { result };
|
|
21
23
|
}
|
|
22
|
-
catch (
|
|
23
|
-
return
|
|
24
|
+
catch (error) {
|
|
25
|
+
return {
|
|
26
|
+
error: error ?? new TypeError(`Function rejected with undefined: ${fn}`),
|
|
27
|
+
};
|
|
24
28
|
}
|
|
25
29
|
};
|
|
26
30
|
exports.trapAsyncFnError = trapAsyncFnError;
|
|
27
31
|
/**
|
|
28
32
|
* Awaits & traps a Promise, capturing any rejection error.
|
|
29
33
|
*
|
|
34
|
+
* @function
|
|
30
35
|
* @param promise The `Promise` to trap
|
|
31
|
-
* @returns
|
|
36
|
+
* @returns Result object
|
|
32
37
|
*/
|
|
33
38
|
const trapPromiseError = async (promise) => {
|
|
34
39
|
try {
|
|
35
|
-
await promise;
|
|
40
|
+
const result = await promise;
|
|
41
|
+
return { result };
|
|
36
42
|
}
|
|
37
|
-
catch (
|
|
38
|
-
return
|
|
43
|
+
catch (error) {
|
|
44
|
+
return { error: error ?? new TypeError('Promise rejected with undefined') };
|
|
39
45
|
}
|
|
40
46
|
};
|
|
41
47
|
exports.trapPromiseError = trapPromiseError;
|
|
@@ -45,18 +51,17 @@ exports.trapPromiseError = trapPromiseError;
|
|
|
45
51
|
*
|
|
46
52
|
* @remarks
|
|
47
53
|
* Avoids throwing `undefined` for some reason.
|
|
54
|
+
* @function
|
|
48
55
|
* @param fn Function to execute
|
|
49
|
-
* @returns
|
|
56
|
+
* @returns Result object
|
|
50
57
|
*/
|
|
51
58
|
const trapError = (fn) => {
|
|
52
59
|
try {
|
|
53
|
-
fn();
|
|
60
|
+
const result = fn();
|
|
61
|
+
return { result };
|
|
54
62
|
}
|
|
55
|
-
catch (
|
|
56
|
-
|
|
57
|
-
return new Error('Function threw undefined');
|
|
58
|
-
}
|
|
59
|
-
return err;
|
|
63
|
+
catch (error) {
|
|
64
|
+
return { error: error ?? new TypeError(`Function threw undefined: ${fn}`) };
|
|
60
65
|
}
|
|
61
66
|
};
|
|
62
67
|
exports.trapError = trapError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertion-util.js","sourceRoot":"","sources":["../../../../src/assertion/impl/assertion-util.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
1
|
+
{"version":3,"file":"assertion-util.js","sourceRoot":"","sources":["../../../../src/assertion/impl/assertion-util.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAMH;;;;;;;;GAQG;AACI,MAAM,gBAAgB,GAAG,KAAK,EACnC,EAAiB,EACI,EAAE;IACvB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC;QAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,KAAK,EAAE,KAAK,IAAI,IAAI,SAAS,CAAC,qCAAqC,EAAE,EAAE,CAAC;SACzE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAXW,QAAA,gBAAgB,oBAW3B;AAEF;;;;;;GAMG;AACI,MAAM,gBAAgB,GAAG,KAAK,EACnC,OAA6B,EACR,EAAE;IACvB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC;QAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,KAAK,EAAE,KAAK,IAAI,IAAI,SAAS,CAAC,iCAAiC,CAAC,EAAE,CAAC;IAC9E,CAAC;AACH,CAAC,CAAC;AATW,QAAA,gBAAgB,oBAS3B;AAEF;;;;;;;;;GASG;AACI,MAAM,SAAS,GAAG,CAAC,EAAiB,EAAc,EAAE;IACzD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,EAAE,EAAE,CAAC;QACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,KAAK,EAAE,KAAK,IAAI,IAAI,SAAS,CAAC,6BAA6B,EAAE,EAAE,CAAC,EAAE,CAAC;IAC9E,CAAC;AACH,CAAC,CAAC;AAPW,QAAA,SAAS,aAOpB"}
|
|
@@ -101,7 +101,17 @@ export declare const promiseRejectAssertion: import("../assertion-types.js").Ass
|
|
|
101
101
|
*
|
|
102
102
|
* @group Parametric Assertions (Async)
|
|
103
103
|
*/
|
|
104
|
-
export declare const functionRejectWithTypeAssertion: import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with a", "to reject with an"], z.ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, ctor: import("../../types.js").Constructor) => Promise<
|
|
104
|
+
export declare const functionRejectWithTypeAssertion: import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with a", "to reject with an"], z.ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, ctor: import("../../types.js").Constructor) => Promise<{
|
|
105
|
+
actual: string;
|
|
106
|
+
expect: string;
|
|
107
|
+
message: string;
|
|
108
|
+
expected?: never;
|
|
109
|
+
} | {
|
|
110
|
+
actual: string;
|
|
111
|
+
expected: string;
|
|
112
|
+
message: string;
|
|
113
|
+
expect?: never;
|
|
114
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to reject with a", "to reject with an"]>, z.ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>]>;
|
|
105
115
|
/**
|
|
106
116
|
* Assertion for testing if a Promise rejects with a specific error type.
|
|
107
117
|
*
|
|
@@ -122,7 +132,17 @@ export declare const functionRejectWithTypeAssertion: import("../assertion-types
|
|
|
122
132
|
*
|
|
123
133
|
* @group Parametric Assertions (Async)
|
|
124
134
|
*/
|
|
125
|
-
export declare const promiseRejectWithTypeAssertion: import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with a", "to reject with an"], z.ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>], (subject: PromiseLike<unknown>, ctor: import("../../types.js").Constructor) => Promise<
|
|
135
|
+
export declare const promiseRejectWithTypeAssertion: import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with a", "to reject with an"], z.ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>], (subject: PromiseLike<unknown>, ctor: import("../../types.js").Constructor) => Promise<{
|
|
136
|
+
actual: string;
|
|
137
|
+
expect: string;
|
|
138
|
+
message: string;
|
|
139
|
+
expected?: never;
|
|
140
|
+
} | {
|
|
141
|
+
actual: string;
|
|
142
|
+
expected: string;
|
|
143
|
+
message: string;
|
|
144
|
+
expect?: never;
|
|
145
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to reject with a", "to reject with an"]>, z.ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>]>;
|
|
126
146
|
/**
|
|
127
147
|
* Assertion for testing if a function rejects with an error satisfying specific
|
|
128
148
|
* criteria.
|
|
@@ -149,11 +169,19 @@ export declare const promiseRejectWithTypeAssertion: import("../assertion-types.
|
|
|
149
169
|
*
|
|
150
170
|
* @group Parametric Assertions (Async)
|
|
151
171
|
*/
|
|
152
|
-
export declare const functionRejectWithErrorSatisfyingAssertion: import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with error satisfying"], z.ZodAny], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: any) => Promise<
|
|
172
|
+
export declare const functionRejectWithErrorSatisfyingAssertion: import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with error satisfying"], z.ZodAny], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: any) => Promise<{
|
|
153
173
|
actual: string;
|
|
154
174
|
expect: string;
|
|
155
175
|
message: string;
|
|
156
|
-
|
|
176
|
+
schema?: never;
|
|
177
|
+
subject?: never;
|
|
178
|
+
} | {
|
|
179
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
180
|
+
subject: {} | null;
|
|
181
|
+
actual?: never;
|
|
182
|
+
expect?: never;
|
|
183
|
+
message?: never;
|
|
184
|
+
}>, readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to reject with error satisfying"]>, z.ZodAny]>;
|
|
157
185
|
/**
|
|
158
186
|
* Assertion for testing if a Promise rejects with an error satisfying specific
|
|
159
187
|
* criteria.
|
|
@@ -180,11 +208,19 @@ export declare const functionRejectWithErrorSatisfyingAssertion: import("../asse
|
|
|
180
208
|
*
|
|
181
209
|
* @group Parametric Assertions (Async)
|
|
182
210
|
*/
|
|
183
|
-
export declare const promiseRejectWithErrorSatisfyingAssertion: import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with error satisfying"], z.ZodAny], (subject: PromiseLike<unknown>, param: any) => Promise<
|
|
211
|
+
export declare const promiseRejectWithErrorSatisfyingAssertion: import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with error satisfying"], z.ZodAny], (subject: PromiseLike<unknown>, param: any) => Promise<{
|
|
184
212
|
actual: string;
|
|
185
213
|
expect: string;
|
|
186
214
|
message: string;
|
|
187
|
-
|
|
215
|
+
schema?: never;
|
|
216
|
+
subject?: never;
|
|
217
|
+
} | {
|
|
218
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
219
|
+
subject: {} | null;
|
|
220
|
+
actual?: never;
|
|
221
|
+
expect?: never;
|
|
222
|
+
message?: never;
|
|
223
|
+
}>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to reject with error satisfying"]>, z.ZodAny]>;
|
|
188
224
|
/**
|
|
189
225
|
* Assertion for testing if a Promise fulfills with a value satisfying specific
|
|
190
226
|
* criteria.
|
|
@@ -211,11 +247,19 @@ export declare const promiseRejectWithErrorSatisfyingAssertion: import("../asser
|
|
|
211
247
|
*
|
|
212
248
|
* @group Parametric Assertions (Async)
|
|
213
249
|
*/
|
|
214
|
-
export declare const
|
|
215
|
-
actual:
|
|
250
|
+
export declare const promiseResolveWithValueSatisfyingAssertion: import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to fulfill with value satisfying", "to resolve with value satisfying"], z.ZodAny], (promise: PromiseLike<unknown>, param: any) => Promise<{
|
|
251
|
+
actual: string;
|
|
216
252
|
expect: string;
|
|
217
253
|
message: string;
|
|
218
|
-
|
|
254
|
+
schema?: never;
|
|
255
|
+
subject?: never;
|
|
256
|
+
} | {
|
|
257
|
+
schema: z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>;
|
|
258
|
+
subject: unknown;
|
|
259
|
+
actual?: never;
|
|
260
|
+
expect?: never;
|
|
261
|
+
message?: never;
|
|
262
|
+
}>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to fulfill with value satisfying", "to resolve with value satisfying"]>, z.ZodAny]>;
|
|
219
263
|
/**
|
|
220
264
|
* Assertion for testing if a function returns a Promise that fulfills with a
|
|
221
265
|
* value satisfying specific criteria.
|
|
@@ -242,9 +286,17 @@ export declare const promiseFulfillWithValueSatisfyingAssertion: import("../asse
|
|
|
242
286
|
*
|
|
243
287
|
* @group Parametric Assertions (Async)
|
|
244
288
|
*/
|
|
245
|
-
export declare const functionFulfillWithValueSatisfyingAssertion: import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to fulfill with value satisfying", "to resolve with value satisfying"], z.ZodAny], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: any) => Promise<
|
|
289
|
+
export declare const functionFulfillWithValueSatisfyingAssertion: import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to fulfill with value satisfying", "to resolve with value satisfying"], z.ZodAny], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: any) => Promise<{
|
|
246
290
|
actual: string;
|
|
247
291
|
expect: string;
|
|
248
292
|
message: string;
|
|
249
|
-
|
|
293
|
+
schema?: never;
|
|
294
|
+
subject?: never;
|
|
295
|
+
} | {
|
|
296
|
+
schema: z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>;
|
|
297
|
+
subject: unknown;
|
|
298
|
+
actual?: never;
|
|
299
|
+
expect?: never;
|
|
300
|
+
message?: never;
|
|
301
|
+
}>, readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to fulfill with value satisfying", "to resolve with value satisfying"]>, z.ZodAny]>;
|
|
250
302
|
//# sourceMappingURL=async-parametric.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-parametric.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/async-parametric.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAgB3B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB;;;;iSAiBpC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB;;;;
|
|
1
|
+
{"version":3,"file":"async-parametric.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/async-parametric.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAgB3B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB;;;;iSAiBpC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB;;;;mLAiBnC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB;;;;iQAYnC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB;;;;mJAYlC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;uYA+B3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;yRA+B1C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,0CAA0C;;;;;;;;;;;;sSA0CtD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,yCAAyC;;;;;;;;;;;;wLAyCrD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,0CAA0C;;;;;;;;;;;;6NA2BtD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,2CAA2C;;;;;;;;;;;;2UA0BvD,CAAC"}
|