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
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* @showGroups
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.functionFulfillWithValueSatisfyingAssertion = exports.
|
|
17
|
+
exports.functionFulfillWithValueSatisfyingAssertion = exports.promiseResolveWithValueSatisfyingAssertion = exports.promiseRejectWithErrorSatisfyingAssertion = exports.functionRejectWithErrorSatisfyingAssertion = exports.promiseRejectWithTypeAssertion = exports.functionRejectWithTypeAssertion = exports.promiseRejectAssertion = exports.functionRejectAssertion = exports.promiseResolveAssertion = exports.functionResolveAssertion = void 0;
|
|
18
18
|
const node_util_1 = require("node:util");
|
|
19
19
|
const v4_1 = require("zod/v4");
|
|
20
20
|
const error_js_1 = require("../../error.js");
|
|
@@ -47,7 +47,7 @@ exports.functionResolveAssertion = (0, create_js_1.createAsyncAssertion)([schema
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
}, {
|
|
50
|
-
anchor: 'to-resolve',
|
|
50
|
+
anchor: 'promise-to-resolve',
|
|
51
51
|
category: 'promise',
|
|
52
52
|
});
|
|
53
53
|
/**
|
|
@@ -73,6 +73,9 @@ exports.promiseResolveAssertion = (0, create_js_1.createAsyncAssertion)([schema_
|
|
|
73
73
|
message: 'Expected promise to fulfill, but it rejected instead',
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
+
}, {
|
|
77
|
+
anchor: 'promise-to-resolve',
|
|
78
|
+
category: 'promise',
|
|
76
79
|
});
|
|
77
80
|
/**
|
|
78
81
|
* Assertion for testing if a function returns a rejected Promise.
|
|
@@ -87,15 +90,14 @@ exports.promiseResolveAssertion = (0, create_js_1.createAsyncAssertion)([schema_
|
|
|
87
90
|
* @group Parametric Assertions (Async)
|
|
88
91
|
*/
|
|
89
92
|
exports.functionRejectAssertion = (0, create_js_1.createAsyncAssertion)([schema_js_1.FunctionSchema, 'to reject'], async (subject) => {
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
const { error, result } = await (0, assertion_util_js_1.trapAsyncFnError)(subject);
|
|
94
|
+
if (error === undefined) {
|
|
92
95
|
return {
|
|
93
96
|
actual: 'function fulfilled',
|
|
94
|
-
expected: 'function
|
|
95
|
-
message:
|
|
97
|
+
expected: 'function rejected',
|
|
98
|
+
message: `Expected function to reject, but it fulfilled with ${(0, node_util_1.inspect)(result)}`,
|
|
96
99
|
};
|
|
97
100
|
}
|
|
98
|
-
catch { }
|
|
99
101
|
});
|
|
100
102
|
/**
|
|
101
103
|
* Assertion for testing if a Promise is rejected.
|
|
@@ -110,15 +112,14 @@ exports.functionRejectAssertion = (0, create_js_1.createAsyncAssertion)([schema_
|
|
|
110
112
|
* @group Parametric Assertions (Async)
|
|
111
113
|
*/
|
|
112
114
|
exports.promiseRejectAssertion = (0, create_js_1.createAsyncAssertion)([schema_js_1.WrappedPromiseLikeSchema, 'to reject'], async (subject) => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
const { error, result } = await (0, assertion_util_js_1.trapPromiseError)(subject);
|
|
116
|
+
if (error === undefined) {
|
|
115
117
|
return {
|
|
116
|
-
actual: '
|
|
117
|
-
expected: '
|
|
118
|
-
message:
|
|
118
|
+
actual: 'Promise fulfilled',
|
|
119
|
+
expected: 'Promise rejected',
|
|
120
|
+
message: `Expected Promise to reject, but it fulfilled with ${(0, node_util_1.inspect)(result)}`,
|
|
119
121
|
};
|
|
120
122
|
}
|
|
121
|
-
catch { }
|
|
122
123
|
});
|
|
123
124
|
/**
|
|
124
125
|
* Assertion for testing if a function rejects with a specific error type.
|
|
@@ -145,11 +146,29 @@ exports.functionRejectWithTypeAssertion = (0, create_js_1.createAsyncAssertion)(
|
|
|
145
146
|
['to reject with a', 'to reject with an'],
|
|
146
147
|
schema_js_1.ConstructibleSchema,
|
|
147
148
|
], async (subject, ctor) => {
|
|
148
|
-
const error = await (0, assertion_util_js_1.trapAsyncFnError)(subject);
|
|
149
|
-
if (
|
|
150
|
-
return
|
|
149
|
+
const { error, result } = await (0, assertion_util_js_1.trapAsyncFnError)(subject);
|
|
150
|
+
if (error === undefined) {
|
|
151
|
+
return {
|
|
152
|
+
actual: 'function fulfilled',
|
|
153
|
+
expect: 'function rejected',
|
|
154
|
+
message: `Expected function to reject, but it fulfilled with ${(0, node_util_1.inspect)(result)}`,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
if (!(0, guards_js_1.isA)(error, ctor)) {
|
|
158
|
+
if ((0, guards_js_1.isNonNullObject)(error)) {
|
|
159
|
+
const err = error;
|
|
160
|
+
return {
|
|
161
|
+
actual: err.constructor.name,
|
|
162
|
+
expected: ctor.name,
|
|
163
|
+
message: `Expected function to reject with an instance of ${ctor.name}, but it rejected with a ${err.constructor.name}`,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
actual: typeof error,
|
|
168
|
+
expected: ctor.name,
|
|
169
|
+
message: `Expected function to reject with an instance of ${ctor.name}, but it rejected with a value of type ${typeof error}: ${(0, node_util_1.inspect)(error)}`,
|
|
170
|
+
};
|
|
151
171
|
}
|
|
152
|
-
return (0, guards_js_1.isA)(error, ctor);
|
|
153
172
|
});
|
|
154
173
|
/**
|
|
155
174
|
* Assertion for testing if a Promise rejects with a specific error type.
|
|
@@ -176,11 +195,29 @@ exports.promiseRejectWithTypeAssertion = (0, create_js_1.createAsyncAssertion)([
|
|
|
176
195
|
['to reject with a', 'to reject with an'],
|
|
177
196
|
schema_js_1.ConstructibleSchema,
|
|
178
197
|
], async (subject, ctor) => {
|
|
179
|
-
const error = await (0, assertion_util_js_1.trapPromiseError)(subject);
|
|
180
|
-
if (
|
|
181
|
-
return
|
|
198
|
+
const { error, result } = await (0, assertion_util_js_1.trapPromiseError)(subject);
|
|
199
|
+
if (error === undefined) {
|
|
200
|
+
return {
|
|
201
|
+
actual: 'Promise fulfilled',
|
|
202
|
+
expect: 'Promise rejected',
|
|
203
|
+
message: `Expected Promise to reject, but it fulfilled with ${(0, node_util_1.inspect)(result)}`,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
if (!(0, guards_js_1.isA)(error, ctor)) {
|
|
207
|
+
if ((0, guards_js_1.isNonNullObject)(error)) {
|
|
208
|
+
const err = error;
|
|
209
|
+
return {
|
|
210
|
+
actual: err.constructor.name,
|
|
211
|
+
expected: ctor.name,
|
|
212
|
+
message: `Expected Promise to reject with an instance of ${ctor.name}, but it rejected with a ${err.constructor.name}`,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
actual: typeof error,
|
|
217
|
+
expected: ctor.name,
|
|
218
|
+
message: `Expected Promise to reject with an instance of ${ctor.name}, but it rejected with a value of type ${typeof error}: ${(0, node_util_1.inspect)(error)}`,
|
|
219
|
+
};
|
|
182
220
|
}
|
|
183
|
-
return (0, guards_js_1.isA)(error, ctor);
|
|
184
221
|
});
|
|
185
222
|
/**
|
|
186
223
|
* Assertion for testing if a function rejects with an error satisfying specific
|
|
@@ -209,12 +246,12 @@ exports.promiseRejectWithTypeAssertion = (0, create_js_1.createAsyncAssertion)([
|
|
|
209
246
|
* @group Parametric Assertions (Async)
|
|
210
247
|
*/
|
|
211
248
|
exports.functionRejectWithErrorSatisfyingAssertion = (0, create_js_1.createAsyncAssertion)([schema_js_1.FunctionSchema, ['to reject with error satisfying'], v4_1.z.any()], async (subject, param) => {
|
|
212
|
-
const error = await (0, assertion_util_js_1.trapAsyncFnError)(subject);
|
|
213
|
-
if (
|
|
249
|
+
const { error, result } = await (0, assertion_util_js_1.trapAsyncFnError)(subject);
|
|
250
|
+
if (error === undefined) {
|
|
214
251
|
return {
|
|
215
252
|
actual: 'function fulfilled',
|
|
216
253
|
expect: 'function to reject',
|
|
217
|
-
message:
|
|
254
|
+
message: `Expected function to reject, but it fulfilled with ${(0, node_util_1.inspect)(result)}`,
|
|
218
255
|
};
|
|
219
256
|
}
|
|
220
257
|
let schema;
|
|
@@ -238,12 +275,12 @@ exports.functionRejectWithErrorSatisfyingAssertion = (0, create_js_1.createAsync
|
|
|
238
275
|
}
|
|
239
276
|
/* c8 ignore next 5 */
|
|
240
277
|
if (!schema) {
|
|
241
|
-
throw new error_js_1.
|
|
242
|
-
}
|
|
243
|
-
const result = schema.safeParse(error);
|
|
244
|
-
if (!result.success) {
|
|
245
|
-
return result.error;
|
|
278
|
+
throw new error_js_1.InvalidObjectSchemaError(`Invalid parameter schema: ${(0, node_util_1.inspect)(param, { depth: 2 })}`, { schema: param });
|
|
246
279
|
}
|
|
280
|
+
return {
|
|
281
|
+
schema,
|
|
282
|
+
subject: error,
|
|
283
|
+
};
|
|
247
284
|
});
|
|
248
285
|
/**
|
|
249
286
|
* Assertion for testing if a Promise rejects with an error satisfying specific
|
|
@@ -272,12 +309,12 @@ exports.functionRejectWithErrorSatisfyingAssertion = (0, create_js_1.createAsync
|
|
|
272
309
|
* @group Parametric Assertions (Async)
|
|
273
310
|
*/
|
|
274
311
|
exports.promiseRejectWithErrorSatisfyingAssertion = (0, create_js_1.createAsyncAssertion)([schema_js_1.WrappedPromiseLikeSchema, ['to reject with error satisfying'], v4_1.z.any()], async (subject, param) => {
|
|
275
|
-
const error = await (0, assertion_util_js_1.trapPromiseError)(subject);
|
|
276
|
-
if (
|
|
312
|
+
const { error, result } = await (0, assertion_util_js_1.trapPromiseError)(subject);
|
|
313
|
+
if (error === undefined) {
|
|
277
314
|
return {
|
|
278
|
-
actual: '
|
|
279
|
-
expect: '
|
|
280
|
-
message:
|
|
315
|
+
actual: 'Promise fulfilled',
|
|
316
|
+
expect: 'Promise rejected',
|
|
317
|
+
message: `Expected Promise to reject, but it fulfilled with ${(0, node_util_1.inspect)(result)}`,
|
|
281
318
|
};
|
|
282
319
|
}
|
|
283
320
|
let schema;
|
|
@@ -301,12 +338,12 @@ exports.promiseRejectWithErrorSatisfyingAssertion = (0, create_js_1.createAsyncA
|
|
|
301
338
|
}
|
|
302
339
|
/* c8 ignore next 5 */
|
|
303
340
|
if (!schema) {
|
|
304
|
-
throw new error_js_1.
|
|
305
|
-
}
|
|
306
|
-
const result = schema.safeParse(error);
|
|
307
|
-
if (!result.success) {
|
|
308
|
-
return result.error;
|
|
341
|
+
throw new error_js_1.InvalidObjectSchemaError(`Invalid parameter schema: ${(0, node_util_1.inspect)(param, { depth: 2 })}`, { schema: param });
|
|
309
342
|
}
|
|
343
|
+
return {
|
|
344
|
+
schema,
|
|
345
|
+
subject: error,
|
|
346
|
+
};
|
|
310
347
|
});
|
|
311
348
|
/**
|
|
312
349
|
* Assertion for testing if a Promise fulfills with a value satisfying specific
|
|
@@ -334,7 +371,7 @@ exports.promiseRejectWithErrorSatisfyingAssertion = (0, create_js_1.createAsyncA
|
|
|
334
371
|
*
|
|
335
372
|
* @group Parametric Assertions (Async)
|
|
336
373
|
*/
|
|
337
|
-
exports.
|
|
374
|
+
exports.promiseResolveWithValueSatisfyingAssertion = (0, create_js_1.createAsyncAssertion)([
|
|
338
375
|
schema_js_1.WrappedPromiseLikeSchema,
|
|
339
376
|
['to fulfill with value satisfying', 'to resolve with value satisfying'],
|
|
340
377
|
v4_1.z.any(),
|
|
@@ -345,16 +382,16 @@ exports.promiseFulfillWithValueSatisfyingAssertion = (0, create_js_1.createAsync
|
|
|
345
382
|
}
|
|
346
383
|
catch (err) {
|
|
347
384
|
return {
|
|
348
|
-
actual:
|
|
349
|
-
expect: '
|
|
350
|
-
message: `Expected
|
|
385
|
+
actual: 'Promise rejected',
|
|
386
|
+
expect: 'Promise to fulfill',
|
|
387
|
+
message: `Expected Promise to fulfill, but it rejected with ${(0, node_util_1.inspect)(err)}`,
|
|
351
388
|
};
|
|
352
389
|
}
|
|
353
390
|
const schema = (0, value_to_schema_js_1.valueToSchema)(param, value_to_schema_js_1.valueToSchemaOptionsForSatisfies);
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
}
|
|
391
|
+
return {
|
|
392
|
+
schema,
|
|
393
|
+
subject: value,
|
|
394
|
+
};
|
|
358
395
|
});
|
|
359
396
|
/**
|
|
360
397
|
* Assertion for testing if a function returns a Promise that fulfills with a
|
|
@@ -394,14 +431,14 @@ exports.functionFulfillWithValueSatisfyingAssertion = (0, create_js_1.createAsyn
|
|
|
394
431
|
catch (err) {
|
|
395
432
|
return {
|
|
396
433
|
actual: 'function rejected',
|
|
397
|
-
expect: 'function
|
|
434
|
+
expect: 'function fulfilled',
|
|
398
435
|
message: `Expected function to fulfill, but it rejected with ${(0, node_util_1.inspect)(err)}`,
|
|
399
436
|
};
|
|
400
437
|
}
|
|
401
438
|
const schema = (0, value_to_schema_js_1.valueToSchema)(param, value_to_schema_js_1.valueToSchemaOptionsForSatisfies);
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
439
|
+
return {
|
|
440
|
+
schema,
|
|
441
|
+
subject: value,
|
|
442
|
+
};
|
|
406
443
|
});
|
|
407
444
|
//# sourceMappingURL=async-parametric.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-parametric.js","sourceRoot":"","sources":["../../../../src/assertion/impl/async-parametric.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,yCAAoC;AACpC,+BAA2B;AAE3B,
|
|
1
|
+
{"version":3,"file":"async-parametric.js","sourceRoot":"","sources":["../../../../src/assertion/impl/async-parametric.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,yCAAoC;AACpC,+BAA2B;AAE3B,6CAA0D;AAC1D,+CAAiE;AACjE,+CAIyB;AACzB,iEAGkC;AAClC,4CAAoD;AACpD,2DAAyE;AAEzE;;;;;;;;;;;GAWG;AACU,QAAA,wBAAwB,GAAG,IAAA,gCAAoB,EAC1D,CAAC,0BAAc,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,EAC9C,KAAK,EAAE,OAAO,EAAE,EAAE;IAChB,IAAI,CAAC;QACH,MAAM,OAAO,EAAE,CAAC;IAClB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,MAAM,EAAE,mBAAmB;YAC3B,QAAQ,EAAE,qBAAqB;YAC/B,OAAO,EAAE,uDAAuD;SACjE,CAAC;IACJ,CAAC;AACH,CAAC,EACD;IACE,MAAM,EAAE,oBAAoB;IAC5B,QAAQ,EAAE,SAAS;CACpB,CACF,CAAC;AAEF;;;;;;;;;;;GAWG;AACU,QAAA,uBAAuB,GAAG,IAAA,gCAAoB,EACzD,CAAC,oCAAwB,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,EACxD,KAAK,EAAE,OAAO,EAAE,EAAE;IAChB,IAAI,CAAC;QACH,MAAM,OAAO,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,MAAM,EAAE,kBAAkB;YAC1B,QAAQ,EAAE,uBA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AAE,OAAO,EAAE,KAAK,EAAE,EAAE;IACvB,IAAI,KAAc,CAAC;IACnB,IAAI,CAAC;QACH,KAAK,GAAG,MAAM,OAAO,EAAE,CAAC;IAC1B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,MAAM,EAAE,mBAAmB;YAC3B,MAAM,EAAE,oBAAoB;YAC5B,OAAO,EAAE,sDAAsD,IAAA,mBAAO,EACpE,GAAG,CACJ,EAAE;SACJ,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,IAAA,kCAAa,EAAC,KAAK,EAAE,qDAAgC,CAAC,CAAC;IACtE,OAAO;QACL,MAAM;QACN,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -27,23 +27,75 @@ export declare const AsyncParametricAssertions: readonly [import("../assertion-t
|
|
|
27
27
|
actual: string;
|
|
28
28
|
expected: string;
|
|
29
29
|
message: string;
|
|
30
|
-
} | undefined>, readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralSlot<"to reject">]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with a", "to reject with an"], import("zod/v4").ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, ctor: import("../../types.js").Constructor) => Promise<
|
|
30
|
+
} | undefined>, readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralSlot<"to reject">]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with a", "to reject with an"], import("zod/v4").ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, ctor: import("../../types.js").Constructor) => Promise<{
|
|
31
31
|
actual: string;
|
|
32
32
|
expect: string;
|
|
33
33
|
message: string;
|
|
34
|
-
|
|
34
|
+
expected?: never;
|
|
35
|
+
} | {
|
|
36
|
+
actual: string;
|
|
37
|
+
expected: string;
|
|
38
|
+
message: string;
|
|
39
|
+
expect?: never;
|
|
40
|
+
} | undefined>, readonly [import("zod/v4").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"]>, import("zod/v4").ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with a", "to reject with an"], import("zod/v4").ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>], (subject: PromiseLike<unknown>, ctor: import("../../types.js").Constructor) => Promise<{
|
|
35
41
|
actual: string;
|
|
36
42
|
expect: string;
|
|
37
43
|
message: string;
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
expected?: never;
|
|
45
|
+
} | {
|
|
46
|
+
actual: string;
|
|
47
|
+
expected: string;
|
|
48
|
+
message: string;
|
|
49
|
+
expect?: never;
|
|
50
|
+
} | undefined>, readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to reject with a", "to reject with an"]>, import("zod/v4").ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with error satisfying"], import("zod/v4").ZodAny], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: any) => Promise<{
|
|
51
|
+
actual: string;
|
|
52
|
+
expect: string;
|
|
53
|
+
message: string;
|
|
54
|
+
schema?: never;
|
|
55
|
+
subject?: never;
|
|
56
|
+
} | {
|
|
57
|
+
schema: import("zod/v4").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
58
|
+
subject: {} | null;
|
|
59
|
+
actual?: never;
|
|
60
|
+
expect?: never;
|
|
61
|
+
message?: never;
|
|
62
|
+
}>, readonly [import("zod/v4").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"]>, import("zod/v4").ZodAny]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with error satisfying"], import("zod/v4").ZodAny], (subject: PromiseLike<unknown>, param: any) => Promise<{
|
|
63
|
+
actual: string;
|
|
64
|
+
expect: string;
|
|
65
|
+
message: string;
|
|
66
|
+
schema?: never;
|
|
67
|
+
subject?: never;
|
|
68
|
+
} | {
|
|
69
|
+
schema: import("zod/v4").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
70
|
+
subject: {} | null;
|
|
71
|
+
actual?: never;
|
|
72
|
+
expect?: never;
|
|
73
|
+
message?: never;
|
|
74
|
+
}>, readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to reject with error satisfying"]>, import("zod/v4").ZodAny]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to fulfill with value satisfying", "to resolve with value satisfying"], import("zod/v4").ZodAny], (promise: PromiseLike<unknown>, param: any) => Promise<{
|
|
75
|
+
actual: string;
|
|
40
76
|
expect: string;
|
|
41
77
|
message: string;
|
|
42
|
-
|
|
78
|
+
schema?: never;
|
|
79
|
+
subject?: never;
|
|
80
|
+
} | {
|
|
81
|
+
schema: import("zod/v4").ZodType<any, unknown, import("zod/v4/core").$ZodTypeInternals<any, unknown>>;
|
|
82
|
+
subject: unknown;
|
|
83
|
+
actual?: never;
|
|
84
|
+
expect?: never;
|
|
85
|
+
message?: never;
|
|
86
|
+
}>, readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to fulfill with value satisfying", "to resolve with value satisfying"]>, import("zod/v4").ZodAny]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").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"], import("zod/v4").ZodAny], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: any) => Promise<{
|
|
43
87
|
actual: string;
|
|
44
88
|
expect: string;
|
|
45
89
|
message: string;
|
|
46
|
-
|
|
90
|
+
schema?: never;
|
|
91
|
+
subject?: never;
|
|
92
|
+
} | {
|
|
93
|
+
schema: import("zod/v4").ZodType<any, unknown, import("zod/v4/core").$ZodTypeInternals<any, unknown>>;
|
|
94
|
+
subject: unknown;
|
|
95
|
+
actual?: never;
|
|
96
|
+
expect?: never;
|
|
97
|
+
message?: never;
|
|
98
|
+
}>, readonly [import("zod/v4").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"]>, import("zod/v4").ZodAny]>];
|
|
47
99
|
/**
|
|
48
100
|
* Tuple of all built-in async assertions (Promise only).
|
|
49
101
|
*
|
|
@@ -65,22 +117,74 @@ export declare const AsyncAssertions: readonly [import("../assertion-types.js").
|
|
|
65
117
|
actual: string;
|
|
66
118
|
expected: string;
|
|
67
119
|
message: string;
|
|
68
|
-
} | undefined>, readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralSlot<"to reject">]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with a", "to reject with an"], import("zod/v4").ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, ctor: import("../../types.js").Constructor) => Promise<
|
|
120
|
+
} | undefined>, readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralSlot<"to reject">]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with a", "to reject with an"], import("zod/v4").ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, ctor: import("../../types.js").Constructor) => Promise<{
|
|
69
121
|
actual: string;
|
|
70
122
|
expect: string;
|
|
71
123
|
message: string;
|
|
72
|
-
|
|
124
|
+
expected?: never;
|
|
125
|
+
} | {
|
|
126
|
+
actual: string;
|
|
127
|
+
expected: string;
|
|
128
|
+
message: string;
|
|
129
|
+
expect?: never;
|
|
130
|
+
} | undefined>, readonly [import("zod/v4").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"]>, import("zod/v4").ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with a", "to reject with an"], import("zod/v4").ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>], (subject: PromiseLike<unknown>, ctor: import("../../types.js").Constructor) => Promise<{
|
|
73
131
|
actual: string;
|
|
74
132
|
expect: string;
|
|
75
133
|
message: string;
|
|
76
|
-
|
|
77
|
-
|
|
134
|
+
expected?: never;
|
|
135
|
+
} | {
|
|
136
|
+
actual: string;
|
|
137
|
+
expected: string;
|
|
138
|
+
message: string;
|
|
139
|
+
expect?: never;
|
|
140
|
+
} | undefined>, readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to reject with a", "to reject with an"]>, import("zod/v4").ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with error satisfying"], import("zod/v4").ZodAny], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: any) => Promise<{
|
|
141
|
+
actual: string;
|
|
142
|
+
expect: string;
|
|
143
|
+
message: string;
|
|
144
|
+
schema?: never;
|
|
145
|
+
subject?: never;
|
|
146
|
+
} | {
|
|
147
|
+
schema: import("zod/v4").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
148
|
+
subject: {} | null;
|
|
149
|
+
actual?: never;
|
|
150
|
+
expect?: never;
|
|
151
|
+
message?: never;
|
|
152
|
+
}>, readonly [import("zod/v4").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"]>, import("zod/v4").ZodAny]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with error satisfying"], import("zod/v4").ZodAny], (subject: PromiseLike<unknown>, param: any) => Promise<{
|
|
153
|
+
actual: string;
|
|
154
|
+
expect: string;
|
|
155
|
+
message: string;
|
|
156
|
+
schema?: never;
|
|
157
|
+
subject?: never;
|
|
158
|
+
} | {
|
|
159
|
+
schema: import("zod/v4").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
160
|
+
subject: {} | null;
|
|
161
|
+
actual?: never;
|
|
162
|
+
expect?: never;
|
|
163
|
+
message?: never;
|
|
164
|
+
}>, readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to reject with error satisfying"]>, import("zod/v4").ZodAny]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to fulfill with value satisfying", "to resolve with value satisfying"], import("zod/v4").ZodAny], (promise: PromiseLike<unknown>, param: any) => Promise<{
|
|
165
|
+
actual: string;
|
|
78
166
|
expect: string;
|
|
79
167
|
message: string;
|
|
80
|
-
|
|
168
|
+
schema?: never;
|
|
169
|
+
subject?: never;
|
|
170
|
+
} | {
|
|
171
|
+
schema: import("zod/v4").ZodType<any, unknown, import("zod/v4/core").$ZodTypeInternals<any, unknown>>;
|
|
172
|
+
subject: unknown;
|
|
173
|
+
actual?: never;
|
|
174
|
+
expect?: never;
|
|
175
|
+
message?: never;
|
|
176
|
+
}>, readonly [import("zod/v4").ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to fulfill with value satisfying", "to resolve with value satisfying"]>, import("zod/v4").ZodAny]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [import("zod/v4").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"], import("zod/v4").ZodAny], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: any) => Promise<{
|
|
81
177
|
actual: string;
|
|
82
178
|
expect: string;
|
|
83
179
|
message: string;
|
|
84
|
-
|
|
180
|
+
schema?: never;
|
|
181
|
+
subject?: never;
|
|
182
|
+
} | {
|
|
183
|
+
schema: import("zod/v4").ZodType<any, unknown, import("zod/v4/core").$ZodTypeInternals<any, unknown>>;
|
|
184
|
+
subject: unknown;
|
|
185
|
+
actual?: never;
|
|
186
|
+
expect?: never;
|
|
187
|
+
message?: never;
|
|
188
|
+
}>, readonly [import("zod/v4").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"]>, import("zod/v4").ZodAny]>];
|
|
85
189
|
export * from './async-parametric.js';
|
|
86
190
|
//# sourceMappingURL=async.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/async.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAeH;;;;GAIG;AACH,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/async.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAeH;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0WAW5B,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0WAA0C,CAAC;AAEvE,cAAc,uBAAuB,CAAC"}
|
|
@@ -38,7 +38,7 @@ exports.AsyncParametricAssertions = [
|
|
|
38
38
|
async_parametric_js_1.promiseRejectWithTypeAssertion,
|
|
39
39
|
async_parametric_js_1.functionRejectWithErrorSatisfyingAssertion,
|
|
40
40
|
async_parametric_js_1.promiseRejectWithErrorSatisfyingAssertion,
|
|
41
|
-
async_parametric_js_1.
|
|
41
|
+
async_parametric_js_1.promiseResolveWithValueSatisfyingAssertion,
|
|
42
42
|
async_parametric_js_1.functionFulfillWithValueSatisfyingAssertion,
|
|
43
43
|
];
|
|
44
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-basic.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/sync-basic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"sync-basic.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/sync-basic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAiB3B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,+KAG1B,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,qOAG3B,CAAC;AAEF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eAAO,MAAM,aAAa,iOAGzB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,+RAG1B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,qLAG9B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,2QAG3B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,iPAG3B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,yKAAgD,CAAC;AAE5E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,iLAU3B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,qPAG3B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;uFAW/B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,8VAGhC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,uOAG1B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,sRAGhC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,kSAGnC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,6KAG5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,yKAGxB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,iLAG5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,iLAG5B,CAAC"}
|
|
@@ -18,6 +18,7 @@ const v4_1 = require("zod/v4");
|
|
|
18
18
|
const metadata_js_1 = require("../../metadata.js");
|
|
19
19
|
const schema_js_1 = require("../../schema.js");
|
|
20
20
|
const create_js_1 = require("../create.js");
|
|
21
|
+
const { ownKeys } = Reflect;
|
|
21
22
|
/**
|
|
22
23
|
* Asserts that the subject is a string value.
|
|
23
24
|
*
|
|
@@ -30,7 +31,10 @@ const create_js_1 = require("../create.js");
|
|
|
30
31
|
*
|
|
31
32
|
* @group Basic Assertions
|
|
32
33
|
*/
|
|
33
|
-
exports.stringAssertion = (0, create_js_1.createAssertion)(['to be a string'], v4_1.z.string()
|
|
34
|
+
exports.stringAssertion = (0, create_js_1.createAssertion)(['to be a string'], v4_1.z.string(), {
|
|
35
|
+
anchor: 'unknown-to-be-a-string',
|
|
36
|
+
category: 'primitives',
|
|
37
|
+
});
|
|
34
38
|
/**
|
|
35
39
|
* Asserts that the subject is a finite number value.
|
|
36
40
|
*
|
|
@@ -453,9 +457,7 @@ exports.emptyArrayAssertion = (0, create_js_1.createAssertion)([schema_js_1.Arra
|
|
|
453
457
|
*
|
|
454
458
|
* @group Basic Assertions
|
|
455
459
|
*/
|
|
456
|
-
exports.emptyObjectAssertion = (0, create_js_1.createAssertion)([v4_1.z.record(v4_1.z.any(), v4_1.z.unknown()), 'to be empty'], v4_1.z
|
|
457
|
-
.record(v4_1.z.any(), v4_1.z.unknown())
|
|
458
|
-
.refine((obj) => Reflect.ownKeys(obj).length === 0));
|
|
460
|
+
exports.emptyObjectAssertion = (0, create_js_1.createAssertion)([v4_1.z.record(v4_1.z.any(), v4_1.z.unknown()), 'to be empty'], v4_1.z.record(v4_1.z.any(), v4_1.z.unknown()).refine((obj) => ownKeys(obj).length === 0));
|
|
459
461
|
/**
|
|
460
462
|
* Asserts that the subject is an Error instance.
|
|
461
463
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-basic.js","sourceRoot":"","sources":["../../../../src/assertion/impl/sync-basic.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAEH,+BAA2B;AAE3B,mDAAmD;AACnD,+CASyB;AACzB,4CAA+C;AAE/C;;;;;;;;;;;GAWG;AACU,QAAA,eAAe,GAAG,IAAA,2BAAe,EA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ClB,CAAC;AAEF;;;;;;;;;;;GAWG;AACU,QAAA,uBAAuB,GAAG,IAAA,2BAAe,EACpD,CAAC,MAAC,CAAC,MAAM,EAAE,EAAE,iBAAiB,CAAC,EAC/B,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAClB,CAAC;AAEF;;;;;;;;;;;GAWG;AACU,QAAA,gBAAgB,GAAG,IAAA,2BAAe,EAC7C,CAAC,eAAe,CAAC,EACjB,MAAC,CAAC,OAAO,EAAE,CAAC,WAAW,EAAE,CAC1B,CAAC;AAEF;;;;;;;;;;;GAWG;AACU,QAAA,YAAY,GAAG,IAAA,2BAAe,EACzC,CAAC,aAAa,CAAC,EACf,MAAC,CAAC,GAAG,CAAC,MAAC,CAAC,OAAO,EAAE,CAAC,CACnB,CAAC;AAEF;;;;;;;;;;;GAWG;AACU,QAAA,gBAAgB,GAAG,IAAA,2BAAe,EAC7C,CAAC,iBAAiB,CAAC,EACnB,MAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CACtB,CAAC;AAEF;;;;;;;;;;;GAWG;AACU,QAAA,gBAAgB,GAAG,IAAA,2BAAe,EAC7C,CAAC,iBAAiB,CAAC,EACnB,MAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-collection.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/sync-collection.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"sync-collection.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/sync-collection.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA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