bupkis 0.1.2 → 0.3.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 +28 -0
- package/README.md +16 -16
- package/dist/commonjs/assertion/assertion-async.d.ts +2 -1
- package/dist/commonjs/assertion/assertion-async.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion-async.js +84 -2
- package/dist/commonjs/assertion/assertion-async.js.map +1 -1
- package/dist/commonjs/assertion/assertion-sync.d.ts +1 -1
- package/dist/commonjs/assertion/assertion-sync.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion-sync.js +5 -1
- package/dist/commonjs/assertion/assertion-sync.js.map +1 -1
- package/dist/commonjs/assertion/assertion-types.d.ts +39 -84
- package/dist/commonjs/assertion/assertion-types.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion.d.ts +1 -1
- package/dist/commonjs/assertion/assertion.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion.js +1 -14
- package/dist/commonjs/assertion/assertion.js.map +1 -1
- package/dist/commonjs/assertion/create.d.ts +5 -33
- package/dist/commonjs/assertion/create.d.ts.map +1 -1
- package/dist/commonjs/assertion/create.js +17 -6
- package/dist/commonjs/assertion/create.js.map +1 -1
- package/dist/commonjs/assertion/impl/async.d.ts +122 -21
- package/dist/commonjs/assertion/impl/async.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/async.js +114 -90
- package/dist/commonjs/assertion/impl/async.js.map +1 -1
- package/dist/commonjs/assertion/impl/callback.d.ts +104 -0
- package/dist/commonjs/assertion/impl/callback.d.ts.map +1 -0
- package/dist/commonjs/assertion/impl/callback.js +694 -0
- package/dist/commonjs/assertion/impl/callback.js.map +1 -0
- package/dist/commonjs/assertion/impl/index.d.ts +1 -1
- package/dist/commonjs/assertion/impl/index.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/index.js.map +1 -1
- package/dist/commonjs/assertion/impl/sync-esoteric.js +1 -1
- package/dist/commonjs/assertion/impl/sync-esoteric.js.map +1 -1
- package/dist/commonjs/assertion/impl/sync-parametric.d.ts +37 -34
- package/dist/commonjs/assertion/impl/sync-parametric.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/sync-parametric.js +32 -47
- package/dist/commonjs/assertion/impl/sync-parametric.js.map +1 -1
- package/dist/commonjs/assertion/impl/sync.d.ts +105 -58
- package/dist/commonjs/assertion/impl/sync.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/sync.js +4 -1
- package/dist/commonjs/assertion/impl/sync.js.map +1 -1
- package/dist/commonjs/bootstrap.d.ts +199 -85
- package/dist/commonjs/bootstrap.d.ts.map +1 -1
- package/dist/commonjs/bootstrap.js +19 -10
- package/dist/commonjs/bootstrap.js.map +1 -1
- package/dist/commonjs/constant.js +7 -1
- package/dist/commonjs/constant.js.map +1 -1
- package/dist/commonjs/error.d.ts +32 -5
- package/dist/commonjs/error.d.ts.map +1 -1
- package/dist/commonjs/error.js +60 -5
- package/dist/commonjs/error.js.map +1 -1
- package/dist/commonjs/expect.d.ts +130 -3
- package/dist/commonjs/expect.d.ts.map +1 -1
- package/dist/commonjs/expect.js +116 -1
- package/dist/commonjs/expect.js.map +1 -1
- package/dist/commonjs/guards.d.ts +45 -20
- package/dist/commonjs/guards.d.ts.map +1 -1
- package/dist/commonjs/guards.js +56 -40
- package/dist/commonjs/guards.js.map +1 -1
- package/dist/commonjs/index.d.ts +241 -86
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +44 -42
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/metadata.d.ts +1 -27
- package/dist/commonjs/metadata.d.ts.map +1 -1
- package/dist/commonjs/metadata.js +16 -15
- package/dist/commonjs/metadata.js.map +1 -1
- package/dist/commonjs/schema.d.ts +76 -33
- package/dist/commonjs/schema.d.ts.map +1 -1
- package/dist/commonjs/schema.js +77 -34
- package/dist/commonjs/schema.js.map +1 -1
- package/dist/commonjs/types.d.ts +480 -39
- package/dist/commonjs/types.d.ts.map +1 -1
- package/dist/commonjs/types.js +12 -2
- package/dist/commonjs/types.js.map +1 -1
- package/dist/commonjs/util.d.ts +72 -49
- package/dist/commonjs/util.d.ts.map +1 -1
- package/dist/commonjs/util.js +175 -155
- package/dist/commonjs/util.js.map +1 -1
- package/dist/commonjs/value-to-schema.d.ts +122 -0
- package/dist/commonjs/value-to-schema.d.ts.map +1 -0
- package/dist/commonjs/value-to-schema.js +309 -0
- package/dist/commonjs/value-to-schema.js.map +1 -0
- package/dist/esm/assertion/assertion-async.d.ts +2 -1
- package/dist/esm/assertion/assertion-async.d.ts.map +1 -1
- package/dist/esm/assertion/assertion-async.js +85 -3
- package/dist/esm/assertion/assertion-async.js.map +1 -1
- package/dist/esm/assertion/assertion-sync.d.ts +1 -1
- package/dist/esm/assertion/assertion-sync.d.ts.map +1 -1
- package/dist/esm/assertion/assertion-sync.js +6 -2
- package/dist/esm/assertion/assertion-sync.js.map +1 -1
- package/dist/esm/assertion/assertion-types.d.ts +39 -84
- package/dist/esm/assertion/assertion-types.d.ts.map +1 -1
- package/dist/esm/assertion/assertion.d.ts +1 -1
- package/dist/esm/assertion/assertion.d.ts.map +1 -1
- package/dist/esm/assertion/assertion.js +1 -14
- package/dist/esm/assertion/assertion.js.map +1 -1
- package/dist/esm/assertion/create.d.ts +5 -33
- package/dist/esm/assertion/create.d.ts.map +1 -1
- package/dist/esm/assertion/create.js +14 -4
- package/dist/esm/assertion/create.js.map +1 -1
- package/dist/esm/assertion/impl/async.d.ts +122 -21
- package/dist/esm/assertion/impl/async.d.ts.map +1 -1
- package/dist/esm/assertion/impl/async.js +113 -89
- package/dist/esm/assertion/impl/async.js.map +1 -1
- package/dist/esm/assertion/impl/callback.d.ts +104 -0
- package/dist/esm/assertion/impl/callback.d.ts.map +1 -0
- package/dist/esm/assertion/impl/callback.js +691 -0
- package/dist/esm/assertion/impl/callback.js.map +1 -0
- package/dist/esm/assertion/impl/index.d.ts +1 -1
- package/dist/esm/assertion/impl/index.d.ts.map +1 -1
- package/dist/esm/assertion/impl/index.js +1 -1
- package/dist/esm/assertion/impl/index.js.map +1 -1
- package/dist/esm/assertion/impl/sync-esoteric.js +2 -2
- package/dist/esm/assertion/impl/sync-esoteric.js.map +1 -1
- package/dist/esm/assertion/impl/sync-parametric.d.ts +37 -34
- package/dist/esm/assertion/impl/sync-parametric.d.ts.map +1 -1
- package/dist/esm/assertion/impl/sync-parametric.js +32 -47
- package/dist/esm/assertion/impl/sync-parametric.js.map +1 -1
- package/dist/esm/assertion/impl/sync.d.ts +105 -58
- package/dist/esm/assertion/impl/sync.d.ts.map +1 -1
- package/dist/esm/assertion/impl/sync.js +3 -1
- package/dist/esm/assertion/impl/sync.js.map +1 -1
- package/dist/esm/bootstrap.d.ts +199 -85
- package/dist/esm/bootstrap.d.ts.map +1 -1
- package/dist/esm/bootstrap.js +19 -10
- package/dist/esm/bootstrap.js.map +1 -1
- package/dist/esm/constant.js +6 -0
- package/dist/esm/constant.js.map +1 -1
- package/dist/esm/error.d.ts +32 -5
- package/dist/esm/error.d.ts.map +1 -1
- package/dist/esm/error.js +59 -5
- package/dist/esm/error.js.map +1 -1
- package/dist/esm/expect.d.ts +130 -3
- package/dist/esm/expect.d.ts.map +1 -1
- package/dist/esm/expect.js +117 -2
- package/dist/esm/expect.js.map +1 -1
- package/dist/esm/guards.d.ts +45 -20
- package/dist/esm/guards.d.ts.map +1 -1
- package/dist/esm/guards.js +48 -31
- package/dist/esm/guards.js.map +1 -1
- package/dist/esm/index.d.ts +241 -86
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +46 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/metadata.d.ts +1 -27
- package/dist/esm/metadata.d.ts.map +1 -1
- package/dist/esm/metadata.js +2 -1
- package/dist/esm/metadata.js.map +1 -1
- package/dist/esm/schema.d.ts +76 -33
- package/dist/esm/schema.d.ts.map +1 -1
- package/dist/esm/schema.js +77 -34
- package/dist/esm/schema.js.map +1 -1
- package/dist/esm/types.d.ts +480 -39
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/types.js +12 -2
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/util.d.ts +72 -49
- package/dist/esm/util.d.ts.map +1 -1
- package/dist/esm/util.js +159 -153
- package/dist/esm/util.js.map +1 -1
- package/dist/esm/value-to-schema.d.ts +122 -0
- package/dist/esm/value-to-schema.d.ts.map +1 -0
- package/dist/esm/value-to-schema.js +305 -0
- package/dist/esm/value-to-schema.js.map +1 -0
- package/package.json +94 -17
- package/src/assertion/assertion-async.ts +113 -3
- package/src/assertion/assertion-sync.ts +5 -2
- package/src/assertion/assertion-types.ts +52 -45
- package/src/assertion/assertion.ts +2 -17
- package/src/assertion/create.ts +16 -65
- package/src/assertion/impl/async.ts +132 -92
- package/src/assertion/impl/callback.ts +882 -0
- package/src/assertion/impl/index.ts +1 -1
- package/src/assertion/impl/sync-esoteric.ts +2 -2
- package/src/assertion/impl/sync-parametric.ts +41 -49
- package/src/assertion/impl/sync.ts +3 -0
- package/src/bootstrap.ts +21 -11
- package/src/constant.ts +8 -0
- package/src/error.ts +75 -4
- package/src/expect.ts +275 -20
- package/src/guards.ts +74 -69
- package/src/index.ts +72 -11
- package/src/metadata.ts +3 -4
- package/src/schema.ts +80 -36
- package/src/types.ts +625 -72
- package/src/util.ts +174 -222
- package/src/value-to-schema.ts +464 -0
- package/dist/commonjs/api.d.ts +0 -93
- package/dist/commonjs/api.d.ts.map +0 -1
- package/dist/commonjs/api.js +0 -8
- package/dist/commonjs/api.js.map +0 -1
- package/dist/esm/api.d.ts +0 -93
- package/dist/esm/api.d.ts.map +0 -1
- package/dist/esm/api.js +0 -7
- package/dist/esm/api.js.map +0 -1
- package/src/api.ts +0 -149
- package/src/schema.md +0 -15
|
@@ -9,37 +9,138 @@
|
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
*/
|
|
11
11
|
import { z } from 'zod/v4';
|
|
12
|
-
|
|
12
|
+
import { CallbackAsyncAssertions } from './callback.js';
|
|
13
|
+
export declare const PromiseAssertions: readonly [import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to resolve", "to fulfill"]], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
14
|
+
actual: string;
|
|
15
|
+
expected: string;
|
|
16
|
+
message: string;
|
|
17
|
+
} | 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 resolve", "to fulfill"]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to resolve", "to fulfill"]], (subject: PromiseLike<unknown>) => Promise<{
|
|
18
|
+
actual: string;
|
|
19
|
+
expected: string;
|
|
20
|
+
message: string;
|
|
21
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to resolve", "to fulfill"]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, "to reject"], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
22
|
+
actual: string;
|
|
23
|
+
expected: string;
|
|
24
|
+
message: string;
|
|
25
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, import("../assertion-types.js").PhraseLiteralSlot<"to reject">]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, "to reject"], (subject: PromiseLike<unknown>) => Promise<{
|
|
26
|
+
actual: string;
|
|
27
|
+
expected: string;
|
|
28
|
+
message: string;
|
|
29
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralSlot<"to reject">]>, 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<boolean>, 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>]>, 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<boolean>, 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>]>, 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.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
13
30
|
[x: string]: unknown;
|
|
14
|
-
}) => Promise<
|
|
31
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
32
|
+
actual: string;
|
|
33
|
+
expect: string;
|
|
34
|
+
message: string;
|
|
35
|
+
} | 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 error satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with error satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: PromiseLike<unknown>, param: string | RegExp | {
|
|
15
36
|
[x: string]: unknown;
|
|
16
|
-
}) => Promise<
|
|
37
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
38
|
+
actual: string;
|
|
39
|
+
expect: string;
|
|
40
|
+
message: string;
|
|
41
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to reject with error satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to fulfill with value satisfying", "to resolve with value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (promise: PromiseLike<unknown>, param: string | RegExp | {
|
|
17
42
|
[x: string]: unknown;
|
|
18
|
-
}) => Promise<
|
|
43
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
19
44
|
actual: unknown;
|
|
20
45
|
expect: string;
|
|
21
46
|
message: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
47
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to fulfill with value satisfying", "to resolve with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, 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.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
48
|
+
[x: string]: unknown;
|
|
49
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
50
|
+
actual: string;
|
|
51
|
+
expect: string;
|
|
52
|
+
message: string;
|
|
53
|
+
} | 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 fulfill with value satisfying", "to resolve with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>];
|
|
54
|
+
export declare const AsyncAssertions: readonly [import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to resolve", "to fulfill"]], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
55
|
+
actual: string;
|
|
56
|
+
expected: string;
|
|
57
|
+
message: string;
|
|
58
|
+
} | 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 resolve", "to fulfill"]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to resolve", "to fulfill"]], (subject: PromiseLike<unknown>) => Promise<{
|
|
59
|
+
actual: string;
|
|
60
|
+
expected: string;
|
|
61
|
+
message: string;
|
|
62
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to resolve", "to fulfill"]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, "to reject"], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
63
|
+
actual: string;
|
|
64
|
+
expected: string;
|
|
65
|
+
message: string;
|
|
66
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, import("../assertion-types.js").PhraseLiteralSlot<"to reject">]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, "to reject"], (subject: PromiseLike<unknown>) => Promise<{
|
|
67
|
+
actual: string;
|
|
68
|
+
expected: string;
|
|
28
69
|
message: string;
|
|
29
|
-
|
|
30
|
-
}>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to fulfill with value satisfying", "to resolve to value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: any[]) => any, (...args: any[]) => any>, readonly ["to fulfill with value satisfying", "to resolve to value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: any[]) => any, param: string | RegExp | {
|
|
70
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralSlot<"to reject">]>, 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<boolean>, 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>]>, 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<boolean>, 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>]>, 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.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
31
71
|
[x: string]: unknown;
|
|
32
|
-
}) => Promise<
|
|
33
|
-
actual:
|
|
72
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
73
|
+
actual: string;
|
|
74
|
+
expect: string;
|
|
75
|
+
message: string;
|
|
76
|
+
} | 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 error satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with error satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: PromiseLike<unknown>, param: string | RegExp | {
|
|
77
|
+
[x: string]: unknown;
|
|
78
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
79
|
+
actual: string;
|
|
34
80
|
expect: string;
|
|
35
81
|
message: string;
|
|
36
|
-
|
|
37
|
-
|
|
82
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to reject with error satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to fulfill with value satisfying", "to resolve with value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (promise: PromiseLike<unknown>, param: string | RegExp | {
|
|
83
|
+
[x: string]: unknown;
|
|
84
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
38
85
|
actual: unknown;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
86
|
+
expect: string;
|
|
87
|
+
message: string;
|
|
88
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to fulfill with value satisfying", "to resolve with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, 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.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
89
|
+
[x: string]: unknown;
|
|
90
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
91
|
+
actual: string;
|
|
92
|
+
expect: string;
|
|
93
|
+
message: string;
|
|
94
|
+
} | 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 fulfill with value satisfying", "to resolve with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call callback", "to eventually invoke callback"]], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
95
|
+
actual: string;
|
|
96
|
+
expected: string;
|
|
97
|
+
message: string;
|
|
98
|
+
} | 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 eventually call callback", "to eventually invoke callback"]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback", "to eventually invoke nodeback"]], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
99
|
+
actual: string;
|
|
100
|
+
expected: string;
|
|
101
|
+
message: string;
|
|
102
|
+
} | 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 eventually call nodeback", "to eventually invoke nodeback"]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call callback with", "to eventually invoke callback with"], z.ZodUnknown], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: unknown) => Promise<z.ZodError<any> | {
|
|
103
|
+
actual: string;
|
|
104
|
+
expected: string;
|
|
105
|
+
message: string;
|
|
106
|
+
} | 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 eventually call callback with", "to eventually invoke callback with"]>, z.ZodUnknown]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call callback with exactly", "to eventually call callback with exact value", "to eventually invoke callback with exactly", "to eventually invoke callback with exact value"], z.ZodUnknown], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, expected: unknown) => Promise<boolean | {
|
|
107
|
+
actual: string;
|
|
108
|
+
expected: string;
|
|
109
|
+
message: string;
|
|
110
|
+
}>, readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call callback with exactly", "to eventually call callback with exact value", "to eventually invoke callback with exactly", "to eventually invoke callback with exact value"]>, z.ZodUnknown]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with", "to eventually invoke nodeback with"], z.ZodUnknown], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: unknown) => Promise<z.ZodError<any> | {
|
|
111
|
+
actual: string;
|
|
112
|
+
expected: string;
|
|
113
|
+
message: string;
|
|
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 eventually call nodeback with", "to eventually invoke nodeback with"]>, z.ZodUnknown]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with exactly", "to eventually call nodeback with exact value", "to eventually invoke nodeback with exactly", "to eventually invoke nodeback with exact value"], z.ZodUnknown], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, expected: unknown) => Promise<boolean | {
|
|
115
|
+
actual: string;
|
|
116
|
+
expected: string;
|
|
117
|
+
message: string;
|
|
118
|
+
}>, readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, import("../assertion-types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call nodeback with exactly", "to eventually call nodeback with exact value", "to eventually invoke nodeback with exactly", "to eventually invoke nodeback with exact value"]>, z.ZodUnknown]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with error", "to eventually invoke nodeback with error"]], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
119
|
+
actual: string;
|
|
120
|
+
expected: string;
|
|
121
|
+
message: string;
|
|
122
|
+
} | 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 eventually call nodeback with error", "to eventually invoke nodeback with error"]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with a", "to eventually call nodeback with an", "to eventually invoke nodeback with a", "to eventually invoke nodeback 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<{
|
|
123
|
+
actual: string;
|
|
124
|
+
expected: string;
|
|
125
|
+
message: string;
|
|
126
|
+
} | 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 eventually call nodeback with a", "to eventually call nodeback with an", "to eventually invoke nodeback with a", "to eventually invoke nodeback with an"]>, z.ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with error", "to eventually invoke nodeback with error"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
127
|
+
[x: string]: unknown;
|
|
128
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
129
|
+
actual: string;
|
|
130
|
+
expected: string;
|
|
131
|
+
message: string;
|
|
132
|
+
} | 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 eventually call nodeback with error", "to eventually invoke nodeback with error"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call callback with value satisfying", "to eventually invoke callback with value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
133
|
+
[x: string]: unknown;
|
|
134
|
+
}) => Promise<z.ZodError<any> | {
|
|
135
|
+
actual: string;
|
|
136
|
+
expected: string;
|
|
137
|
+
message: string;
|
|
138
|
+
} | 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 eventually call callback with value satisfying", "to eventually invoke callback with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("../assertion-types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with value satisfying", "to eventually invoke nodeback with value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
139
|
+
[x: string]: unknown;
|
|
140
|
+
}) => Promise<z.ZodError<any> | {
|
|
141
|
+
actual: string;
|
|
142
|
+
expected: string;
|
|
42
143
|
message: string;
|
|
43
|
-
|
|
44
|
-
|
|
144
|
+
} | 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 eventually call nodeback with value satisfying", "to eventually invoke nodeback with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>];
|
|
145
|
+
export { CallbackAsyncAssertions };
|
|
45
146
|
//# sourceMappingURL=async.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/async.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../../src/assertion/impl/async.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAa3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAkBxD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+aAiRpB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mdAGlB,CAAC;AAEX,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -12,8 +12,9 @@ import { inspect } from 'node:util';
|
|
|
12
12
|
import { z } from 'zod/v4';
|
|
13
13
|
import { isA, isNonNullObject, isString } from '../../guards.js';
|
|
14
14
|
import { ClassSchema, FunctionSchema, WrappedPromiseLikeSchema, } from '../../schema.js';
|
|
15
|
-
import { valueToSchema } from '../../
|
|
15
|
+
import { valueToSchema, valueToSchemaOptionsForSatisfies, } from '../../value-to-schema.js';
|
|
16
16
|
import { createAsyncAssertion } from '../create.js';
|
|
17
|
+
import { CallbackAsyncAssertions } from './callback.js';
|
|
17
18
|
const trapAsyncFnError = async (fn) => {
|
|
18
19
|
try {
|
|
19
20
|
await fn();
|
|
@@ -30,45 +31,53 @@ const trapPromiseError = async (promise) => {
|
|
|
30
31
|
return err;
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
|
-
export const
|
|
34
|
+
export const PromiseAssertions = [
|
|
34
35
|
createAsyncAssertion([FunctionSchema, ['to resolve', 'to fulfill']], async (subject) => {
|
|
35
36
|
try {
|
|
36
37
|
await subject();
|
|
37
|
-
return true;
|
|
38
38
|
}
|
|
39
39
|
catch {
|
|
40
|
-
return
|
|
40
|
+
return {
|
|
41
|
+
actual: 'function rejected',
|
|
42
|
+
expected: 'function to fulfill',
|
|
43
|
+
message: 'Expected function to fulfill, but it rejected instead',
|
|
44
|
+
};
|
|
41
45
|
}
|
|
42
46
|
}),
|
|
43
47
|
createAsyncAssertion([WrappedPromiseLikeSchema, ['to resolve', 'to fulfill']], async (subject) => {
|
|
44
48
|
try {
|
|
45
49
|
await subject;
|
|
46
|
-
return true;
|
|
47
50
|
}
|
|
48
51
|
catch {
|
|
49
|
-
return
|
|
52
|
+
return {
|
|
53
|
+
actual: 'promise rejected',
|
|
54
|
+
expected: 'promise to not reject',
|
|
55
|
+
message: 'Expected promise to fulfill, but it rejected instead',
|
|
56
|
+
};
|
|
50
57
|
}
|
|
51
58
|
}),
|
|
52
59
|
// Non-parameterized "to reject" assertions
|
|
53
60
|
createAsyncAssertion([FunctionSchema, 'to reject'], async (subject) => {
|
|
54
|
-
let rejected = false;
|
|
55
61
|
try {
|
|
56
62
|
await subject();
|
|
63
|
+
return {
|
|
64
|
+
actual: 'function fulfilled',
|
|
65
|
+
expected: 'function to reject',
|
|
66
|
+
message: 'Expected function to reject, but it fulfilled instead',
|
|
67
|
+
};
|
|
57
68
|
}
|
|
58
|
-
catch {
|
|
59
|
-
rejected = true;
|
|
60
|
-
}
|
|
61
|
-
return rejected;
|
|
69
|
+
catch { }
|
|
62
70
|
}),
|
|
63
71
|
createAsyncAssertion([WrappedPromiseLikeSchema, 'to reject'], async (subject) => {
|
|
64
|
-
let rejected = false;
|
|
65
72
|
try {
|
|
66
73
|
await subject;
|
|
74
|
+
return {
|
|
75
|
+
actual: 'function fulfilled',
|
|
76
|
+
expected: 'function to reject',
|
|
77
|
+
message: 'Expected function to reject, but it fulfilled instead',
|
|
78
|
+
};
|
|
67
79
|
}
|
|
68
|
-
catch {
|
|
69
|
-
rejected = true;
|
|
70
|
-
}
|
|
71
|
-
return rejected;
|
|
80
|
+
catch { }
|
|
72
81
|
}),
|
|
73
82
|
// Parameterized "to reject" with class constructor
|
|
74
83
|
createAsyncAssertion([FunctionSchema, ['to reject with a', 'to reject with an'], ClassSchema], async (subject, ctor) => {
|
|
@@ -92,71 +101,89 @@ export const AsyncAssertions = [
|
|
|
92
101
|
// Parameterized "to reject" with string, RegExp, or object patterns
|
|
93
102
|
createAsyncAssertion([
|
|
94
103
|
FunctionSchema,
|
|
95
|
-
['to reject with'],
|
|
104
|
+
['to reject with error satisfying'],
|
|
96
105
|
z.union([z.string(), z.instanceof(RegExp), z.looseObject({})]),
|
|
97
106
|
], async (subject, param) => {
|
|
98
107
|
const error = await trapAsyncFnError(subject);
|
|
99
108
|
if (!error) {
|
|
100
|
-
return
|
|
109
|
+
return {
|
|
110
|
+
actual: 'function fulfilled',
|
|
111
|
+
expect: 'function to reject',
|
|
112
|
+
message: 'Expected function to reject, but it fulfilled instead',
|
|
113
|
+
};
|
|
101
114
|
}
|
|
115
|
+
let schema;
|
|
116
|
+
// TODO: can valueToSchema handle the first two conditional branches?
|
|
102
117
|
if (isString(param)) {
|
|
103
|
-
|
|
104
|
-
.
|
|
118
|
+
schema = z
|
|
119
|
+
.looseObject({
|
|
105
120
|
message: z.coerce.string().pipe(z.literal(param)),
|
|
106
121
|
})
|
|
107
|
-
.or(z.coerce.string().pipe(z.literal(param)))
|
|
108
|
-
.safeParse(error).success;
|
|
122
|
+
.or(z.coerce.string().pipe(z.literal(param)));
|
|
109
123
|
}
|
|
110
124
|
else if (isA(param, RegExp)) {
|
|
111
|
-
|
|
112
|
-
.
|
|
125
|
+
schema = z
|
|
126
|
+
.looseObject({
|
|
113
127
|
message: z.coerce.string().regex(param),
|
|
114
128
|
})
|
|
115
|
-
.or(z.coerce.string().regex(param))
|
|
116
|
-
.safeParse(error).success;
|
|
129
|
+
.or(z.coerce.string().regex(param));
|
|
117
130
|
}
|
|
118
131
|
else if (isNonNullObject(param)) {
|
|
119
|
-
|
|
132
|
+
schema = valueToSchema(param, valueToSchemaOptionsForSatisfies);
|
|
133
|
+
}
|
|
134
|
+
/* c8 ignore next 5 */
|
|
135
|
+
if (!schema) {
|
|
136
|
+
throw new TypeError(`Invalid parameter schema: ${inspect(param, { depth: 2 })}`);
|
|
120
137
|
}
|
|
121
|
-
|
|
122
|
-
|
|
138
|
+
const result = schema.safeParse(error);
|
|
139
|
+
if (!result.success) {
|
|
140
|
+
return result.error;
|
|
123
141
|
}
|
|
124
142
|
}),
|
|
125
143
|
createAsyncAssertion([
|
|
126
144
|
WrappedPromiseLikeSchema,
|
|
127
|
-
['to reject with'],
|
|
145
|
+
['to reject with error satisfying'],
|
|
128
146
|
z.union([z.string(), z.instanceof(RegExp), z.looseObject({})]),
|
|
129
147
|
], async (subject, param) => {
|
|
130
148
|
const error = await trapPromiseError(subject);
|
|
131
149
|
if (!error) {
|
|
132
|
-
return
|
|
150
|
+
return {
|
|
151
|
+
actual: 'promise fulfilled',
|
|
152
|
+
expect: 'promise to reject',
|
|
153
|
+
message: 'Expected promise to reject, but it fulfilled instead',
|
|
154
|
+
};
|
|
133
155
|
}
|
|
156
|
+
let schema;
|
|
157
|
+
// TODO: can valueToSchema handle the first two conditional branches?
|
|
134
158
|
if (isString(param)) {
|
|
135
|
-
|
|
136
|
-
.
|
|
159
|
+
schema = z
|
|
160
|
+
.looseObject({
|
|
137
161
|
message: z.coerce.string().pipe(z.literal(param)),
|
|
138
162
|
})
|
|
139
|
-
.or(z.coerce.string().pipe(z.literal(param)))
|
|
140
|
-
.safeParse(error).success;
|
|
163
|
+
.or(z.coerce.string().pipe(z.literal(param)));
|
|
141
164
|
}
|
|
142
165
|
else if (isA(param, RegExp)) {
|
|
143
|
-
|
|
144
|
-
.
|
|
166
|
+
schema = z
|
|
167
|
+
.looseObject({
|
|
145
168
|
message: z.coerce.string().regex(param),
|
|
146
169
|
})
|
|
147
|
-
.or(z.coerce.string().regex(param))
|
|
148
|
-
.safeParse(error).success;
|
|
170
|
+
.or(z.coerce.string().regex(param));
|
|
149
171
|
}
|
|
150
172
|
else if (isNonNullObject(param)) {
|
|
151
|
-
|
|
173
|
+
schema = valueToSchema(param, valueToSchemaOptionsForSatisfies);
|
|
174
|
+
}
|
|
175
|
+
/* c8 ignore next 5 */
|
|
176
|
+
if (!schema) {
|
|
177
|
+
throw new TypeError(`Invalid parameter schema: ${inspect(param, { depth: 2 })}`);
|
|
152
178
|
}
|
|
153
|
-
|
|
154
|
-
|
|
179
|
+
const result = schema.safeParse(error);
|
|
180
|
+
if (!result.success) {
|
|
181
|
+
return result.error;
|
|
155
182
|
}
|
|
156
183
|
}),
|
|
157
184
|
createAsyncAssertion([
|
|
158
185
|
WrappedPromiseLikeSchema,
|
|
159
|
-
['to fulfill with value satisfying', 'to resolve
|
|
186
|
+
['to fulfill with value satisfying', 'to resolve with value satisfying'],
|
|
160
187
|
z.union([z.string(), z.instanceof(RegExp), z.looseObject({})]),
|
|
161
188
|
], async (promise, param) => {
|
|
162
189
|
let value;
|
|
@@ -170,41 +197,37 @@ export const AsyncAssertions = [
|
|
|
170
197
|
message: `Expected promise to not reject, but it rejected with ${inspect(err)}`,
|
|
171
198
|
};
|
|
172
199
|
}
|
|
200
|
+
let schema;
|
|
201
|
+
// TODO: can valueToSchema handle the first two conditional branches?
|
|
173
202
|
if (isString(param)) {
|
|
174
|
-
|
|
175
|
-
.
|
|
203
|
+
schema = z
|
|
204
|
+
.looseObject({
|
|
176
205
|
message: z.coerce.string().pipe(z.literal(param)),
|
|
177
206
|
})
|
|
178
|
-
.or(z.coerce.string().pipe(z.literal(param)))
|
|
179
|
-
.safeParse(value).success;
|
|
207
|
+
.or(z.coerce.string().pipe(z.literal(param)));
|
|
180
208
|
}
|
|
181
209
|
else if (isA(param, RegExp)) {
|
|
182
|
-
|
|
183
|
-
.
|
|
210
|
+
schema = z
|
|
211
|
+
.looseObject({
|
|
184
212
|
message: z.coerce.string().regex(param),
|
|
185
213
|
})
|
|
186
|
-
.or(z.coerce.string().regex(param))
|
|
187
|
-
.safeParse(value).success;
|
|
214
|
+
.or(z.coerce.string().regex(param));
|
|
188
215
|
}
|
|
189
216
|
else if (isNonNullObject(param)) {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
return true;
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
throw new TypeError(`Invalid parameter schema: ${inspect(param)}`);
|
|
217
|
+
schema = valueToSchema(param, valueToSchemaOptionsForSatisfies);
|
|
218
|
+
}
|
|
219
|
+
/* c8 ignore next 5 */
|
|
220
|
+
if (!schema) {
|
|
221
|
+
throw new TypeError(`Invalid parameter schema: ${inspect(param, { depth: 2 })}`);
|
|
222
|
+
}
|
|
223
|
+
const result = schema.safeParse(value);
|
|
224
|
+
if (!result.success) {
|
|
225
|
+
return result.error;
|
|
203
226
|
}
|
|
204
227
|
}),
|
|
205
228
|
createAsyncAssertion([
|
|
206
229
|
FunctionSchema,
|
|
207
|
-
['to fulfill with value satisfying', 'to resolve
|
|
230
|
+
['to fulfill with value satisfying', 'to resolve with value satisfying'],
|
|
208
231
|
z.union([z.string(), z.instanceof(RegExp), z.looseObject({})]),
|
|
209
232
|
], async (subject, param) => {
|
|
210
233
|
let value;
|
|
@@ -213,42 +236,43 @@ export const AsyncAssertions = [
|
|
|
213
236
|
}
|
|
214
237
|
catch (err) {
|
|
215
238
|
return {
|
|
216
|
-
actual:
|
|
217
|
-
expect: 'function to
|
|
218
|
-
message: `Expected function to
|
|
239
|
+
actual: 'function rejected',
|
|
240
|
+
expect: 'function to fulfill',
|
|
241
|
+
message: `Expected function to fulfill, but it rejected with ${inspect(err)}`,
|
|
219
242
|
};
|
|
220
243
|
}
|
|
244
|
+
let schema;
|
|
245
|
+
// TODO: can valueToSchema handle the first two conditional branches?
|
|
221
246
|
if (isString(param)) {
|
|
222
|
-
|
|
223
|
-
.
|
|
247
|
+
schema = z
|
|
248
|
+
.looseObject({
|
|
224
249
|
message: z.coerce.string().pipe(z.literal(param)),
|
|
225
250
|
})
|
|
226
|
-
.or(z.coerce.string().pipe(z.literal(param)))
|
|
227
|
-
.safeParse(value).success;
|
|
251
|
+
.or(z.coerce.string().pipe(z.literal(param)));
|
|
228
252
|
}
|
|
229
253
|
else if (isA(param, RegExp)) {
|
|
230
|
-
|
|
231
|
-
.
|
|
254
|
+
schema = z
|
|
255
|
+
.looseObject({
|
|
232
256
|
message: z.coerce.string().regex(param),
|
|
233
257
|
})
|
|
234
|
-
.or(z.coerce.string().regex(param))
|
|
235
|
-
.safeParse(value).success;
|
|
258
|
+
.or(z.coerce.string().regex(param));
|
|
236
259
|
}
|
|
237
260
|
else if (isNonNullObject(param)) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
return true;
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
throw new TypeError(`Invalid parameter schema: ${inspect(param)}`);
|
|
261
|
+
schema = valueToSchema(param, valueToSchemaOptionsForSatisfies);
|
|
262
|
+
}
|
|
263
|
+
/* c8 ignore next 5 */
|
|
264
|
+
if (!schema) {
|
|
265
|
+
throw new TypeError(`Invalid parameter schema: ${inspect(param, { depth: 2 })}`);
|
|
266
|
+
}
|
|
267
|
+
const result = schema.safeParse(value);
|
|
268
|
+
if (!result.success) {
|
|
269
|
+
return result.error;
|
|
251
270
|
}
|
|
252
271
|
}),
|
|
253
272
|
];
|
|
273
|
+
export const AsyncAssertions = [
|
|
274
|
+
...PromiseAssertions,
|
|
275
|
+
...CallbackAsyncAssertions,
|
|
276
|
+
];
|
|
277
|
+
export { CallbackAsyncAssertions };
|
|
254
278
|
//# sourceMappingURL=async.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../src/assertion/impl/async.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EACL,WAAW,EACX,cAAc,EACd,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../src/assertion/impl/async.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EACL,WAAW,EACX,cAAc,EACd,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,gCAAgC,GACjC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;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