bupkis 0.18.1 → 0.18.2
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 +7 -0
- package/package.json +1 -4
- package/src/assertion/assertion-types.ts +4 -4
- package/src/assertion/impl/sync-parametric.ts +1 -1
- package/src/expect.ts +0 -4
- package/src/guards.ts +24 -24
- package/src/internal-schema.ts +16 -32
- package/src/value-to-schema.ts +1 -1
- package/dist/assertion/assertion-async.cjs +0 -268
- package/dist/assertion/assertion-async.cjs.map +0 -1
- package/dist/assertion/assertion-async.d.cts +0 -40
- package/dist/assertion/assertion-async.d.cts.map +0 -1
- package/dist/assertion/assertion-async.d.ts +0 -40
- package/dist/assertion/assertion-async.d.ts.map +0 -1
- package/dist/assertion/assertion-async.js +0 -259
- package/dist/assertion/assertion-async.js.map +0 -1
- package/dist/assertion/assertion-standard-schema-async.cjs +0 -132
- package/dist/assertion/assertion-standard-schema-async.cjs.map +0 -1
- package/dist/assertion/assertion-standard-schema-async.d.cts +0 -52
- package/dist/assertion/assertion-standard-schema-async.d.cts.map +0 -1
- package/dist/assertion/assertion-standard-schema-async.d.ts +0 -52
- package/dist/assertion/assertion-standard-schema-async.d.ts.map +0 -1
- package/dist/assertion/assertion-standard-schema-async.js +0 -128
- package/dist/assertion/assertion-standard-schema-async.js.map +0 -1
- package/dist/assertion/assertion-standard-schema-sync.cjs +0 -141
- package/dist/assertion/assertion-standard-schema-sync.cjs.map +0 -1
- package/dist/assertion/assertion-standard-schema-sync.d.cts +0 -52
- package/dist/assertion/assertion-standard-schema-sync.d.cts.map +0 -1
- package/dist/assertion/assertion-standard-schema-sync.d.ts +0 -52
- package/dist/assertion/assertion-standard-schema-sync.d.ts.map +0 -1
- package/dist/assertion/assertion-standard-schema-sync.js +0 -137
- package/dist/assertion/assertion-standard-schema-sync.js.map +0 -1
- package/dist/assertion/assertion-sync.cjs +0 -284
- package/dist/assertion/assertion-sync.cjs.map +0 -1
- package/dist/assertion/assertion-sync.d.cts +0 -60
- package/dist/assertion/assertion-sync.d.cts.map +0 -1
- package/dist/assertion/assertion-sync.d.ts +0 -60
- package/dist/assertion/assertion-sync.d.ts.map +0 -1
- package/dist/assertion/assertion-sync.js +0 -275
- package/dist/assertion/assertion-sync.js.map +0 -1
- package/dist/assertion/assertion-types.cjs +0 -20
- package/dist/assertion/assertion-types.cjs.map +0 -1
- package/dist/assertion/assertion-types.d.cts +0 -1086
- package/dist/assertion/assertion-types.d.cts.map +0 -1
- package/dist/assertion/assertion-types.d.ts +0 -1086
- package/dist/assertion/assertion-types.d.ts.map +0 -1
- package/dist/assertion/assertion-types.js +0 -19
- package/dist/assertion/assertion-types.js.map +0 -1
- package/dist/assertion/assertion.cjs +0 -382
- package/dist/assertion/assertion.cjs.map +0 -1
- package/dist/assertion/assertion.d.cts +0 -109
- package/dist/assertion/assertion.d.cts.map +0 -1
- package/dist/assertion/assertion.d.ts +0 -109
- package/dist/assertion/assertion.d.ts.map +0 -1
- package/dist/assertion/assertion.js +0 -375
- package/dist/assertion/assertion.js.map +0 -1
- package/dist/assertion/create.cjs +0 -148
- package/dist/assertion/create.cjs.map +0 -1
- package/dist/assertion/create.d.cts +0 -85
- package/dist/assertion/create.d.cts.map +0 -1
- package/dist/assertion/create.d.ts +0 -85
- package/dist/assertion/create.d.ts.map +0 -1
- package/dist/assertion/create.js +0 -143
- package/dist/assertion/create.js.map +0 -1
- package/dist/assertion/format-assertion-failure.cjs +0 -63
- package/dist/assertion/format-assertion-failure.cjs.map +0 -1
- package/dist/assertion/format-assertion-failure.d.cts +0 -21
- package/dist/assertion/format-assertion-failure.d.cts.map +0 -1
- package/dist/assertion/format-assertion-failure.d.ts +0 -21
- package/dist/assertion/format-assertion-failure.d.ts.map +0 -1
- package/dist/assertion/format-assertion-failure.js +0 -59
- package/dist/assertion/format-assertion-failure.js.map +0 -1
- package/dist/assertion/impl/assertion-util.cjs +0 -68
- package/dist/assertion/impl/assertion-util.cjs.map +0 -1
- package/dist/assertion/impl/assertion-util.d.cts +0 -36
- package/dist/assertion/impl/assertion-util.d.cts.map +0 -1
- package/dist/assertion/impl/assertion-util.d.ts +0 -36
- package/dist/assertion/impl/assertion-util.d.ts.map +0 -1
- package/dist/assertion/impl/assertion-util.js +0 -62
- package/dist/assertion/impl/assertion-util.js.map +0 -1
- package/dist/assertion/impl/async-iterable.cjs +0 -627
- package/dist/assertion/impl/async-iterable.cjs.map +0 -1
- package/dist/assertion/impl/async-iterable.d.cts +0 -406
- package/dist/assertion/impl/async-iterable.d.cts.map +0 -1
- package/dist/assertion/impl/async-iterable.d.ts +0 -406
- package/dist/assertion/impl/async-iterable.d.ts.map +0 -1
- package/dist/assertion/impl/async-iterable.js +0 -624
- package/dist/assertion/impl/async-iterable.js.map +0 -1
- package/dist/assertion/impl/async-parametric.cjs +0 -412
- package/dist/assertion/impl/async-parametric.cjs.map +0 -1
- package/dist/assertion/impl/async-parametric.d.cts +0 -278
- package/dist/assertion/impl/async-parametric.d.cts.map +0 -1
- package/dist/assertion/impl/async-parametric.d.ts +0 -278
- package/dist/assertion/impl/async-parametric.d.ts.map +0 -1
- package/dist/assertion/impl/async-parametric.js +0 -409
- package/dist/assertion/impl/async-parametric.js.map +0 -1
- package/dist/assertion/impl/async.cjs +0 -56
- package/dist/assertion/impl/async.cjs.map +0 -1
- package/dist/assertion/impl/async.d.cts +0 -179
- package/dist/assertion/impl/async.d.cts.map +0 -1
- package/dist/assertion/impl/async.d.ts +0 -179
- package/dist/assertion/impl/async.d.ts.map +0 -1
- package/dist/assertion/impl/async.js +0 -39
- package/dist/assertion/impl/async.js.map +0 -1
- package/dist/assertion/impl/index.cjs +0 -37
- package/dist/assertion/impl/index.cjs.map +0 -1
- package/dist/assertion/impl/index.d.cts +0 -21
- package/dist/assertion/impl/index.d.cts.map +0 -1
- package/dist/assertion/impl/index.d.ts +0 -21
- package/dist/assertion/impl/index.d.ts.map +0 -1
- package/dist/assertion/impl/index.js +0 -21
- package/dist/assertion/impl/index.js.map +0 -1
- package/dist/assertion/impl/iteration-util.cjs +0 -297
- package/dist/assertion/impl/iteration-util.cjs.map +0 -1
- package/dist/assertion/impl/iteration-util.d.cts +0 -12
- package/dist/assertion/impl/iteration-util.d.cts.map +0 -1
- package/dist/assertion/impl/iteration-util.d.ts +0 -12
- package/dist/assertion/impl/iteration-util.d.ts.map +0 -1
- package/dist/assertion/impl/iteration-util.js +0 -282
- package/dist/assertion/impl/iteration-util.js.map +0 -1
- package/dist/assertion/impl/snapshot.cjs +0 -276
- package/dist/assertion/impl/snapshot.cjs.map +0 -1
- package/dist/assertion/impl/snapshot.d.cts +0 -278
- package/dist/assertion/impl/snapshot.d.cts.map +0 -1
- package/dist/assertion/impl/snapshot.d.ts +0 -278
- package/dist/assertion/impl/snapshot.d.ts.map +0 -1
- package/dist/assertion/impl/snapshot.js +0 -273
- package/dist/assertion/impl/snapshot.js.map +0 -1
- package/dist/assertion/impl/sync-basic.cjs +0 -553
- package/dist/assertion/impl/sync-basic.cjs.map +0 -1
- package/dist/assertion/impl/sync-basic.d.cts +0 -528
- package/dist/assertion/impl/sync-basic.d.cts.map +0 -1
- package/dist/assertion/impl/sync-basic.d.ts +0 -528
- package/dist/assertion/impl/sync-basic.d.ts.map +0 -1
- package/dist/assertion/impl/sync-basic.js +0 -550
- package/dist/assertion/impl/sync-basic.js.map +0 -1
- package/dist/assertion/impl/sync-collection.cjs +0 -856
- package/dist/assertion/impl/sync-collection.cjs.map +0 -1
- package/dist/assertion/impl/sync-collection.d.cts +0 -607
- package/dist/assertion/impl/sync-collection.d.cts.map +0 -1
- package/dist/assertion/impl/sync-collection.d.ts +0 -607
- package/dist/assertion/impl/sync-collection.d.ts.map +0 -1
- package/dist/assertion/impl/sync-collection.js +0 -850
- package/dist/assertion/impl/sync-collection.js.map +0 -1
- package/dist/assertion/impl/sync-date.cjs +0 -341
- package/dist/assertion/impl/sync-date.cjs.map +0 -1
- package/dist/assertion/impl/sync-date.d.cts +0 -209
- package/dist/assertion/impl/sync-date.d.cts.map +0 -1
- package/dist/assertion/impl/sync-date.d.ts +0 -209
- package/dist/assertion/impl/sync-date.d.ts.map +0 -1
- package/dist/assertion/impl/sync-date.js +0 -338
- package/dist/assertion/impl/sync-date.js.map +0 -1
- package/dist/assertion/impl/sync-esoteric.cjs +0 -214
- package/dist/assertion/impl/sync-esoteric.cjs.map +0 -1
- package/dist/assertion/impl/sync-esoteric.d.cts +0 -191
- package/dist/assertion/impl/sync-esoteric.d.cts.map +0 -1
- package/dist/assertion/impl/sync-esoteric.d.ts +0 -191
- package/dist/assertion/impl/sync-esoteric.d.ts.map +0 -1
- package/dist/assertion/impl/sync-esoteric.js +0 -211
- package/dist/assertion/impl/sync-esoteric.js.map +0 -1
- package/dist/assertion/impl/sync-iterable.cjs +0 -512
- package/dist/assertion/impl/sync-iterable.cjs.map +0 -1
- package/dist/assertion/impl/sync-iterable.d.cts +0 -334
- package/dist/assertion/impl/sync-iterable.d.cts.map +0 -1
- package/dist/assertion/impl/sync-iterable.d.ts +0 -334
- package/dist/assertion/impl/sync-iterable.d.ts.map +0 -1
- package/dist/assertion/impl/sync-iterable.js +0 -509
- package/dist/assertion/impl/sync-iterable.js.map +0 -1
- package/dist/assertion/impl/sync-parametric.cjs +0 -805
- package/dist/assertion/impl/sync-parametric.cjs.map +0 -1
- package/dist/assertion/impl/sync-parametric.d.cts +0 -560
- package/dist/assertion/impl/sync-parametric.d.cts.map +0 -1
- package/dist/assertion/impl/sync-parametric.d.ts +0 -560
- package/dist/assertion/impl/sync-parametric.d.ts.map +0 -1
- package/dist/assertion/impl/sync-parametric.js +0 -802
- package/dist/assertion/impl/sync-parametric.js.map +0 -1
- package/dist/assertion/impl/sync.cjs +0 -214
- package/dist/assertion/impl/sync.cjs.map +0 -1
- package/dist/assertion/impl/sync.d.cts +0 -512
- package/dist/assertion/impl/sync.d.cts.map +0 -1
- package/dist/assertion/impl/sync.d.ts +0 -512
- package/dist/assertion/impl/sync.d.ts.map +0 -1
- package/dist/assertion/impl/sync.js +0 -197
- package/dist/assertion/impl/sync.js.map +0 -1
- package/dist/assertion/index.cjs +0 -38
- package/dist/assertion/index.cjs.map +0 -1
- package/dist/assertion/index.d.cts +0 -18
- package/dist/assertion/index.d.cts.map +0 -1
- package/dist/assertion/index.d.ts +0 -18
- package/dist/assertion/index.d.ts.map +0 -1
- package/dist/assertion/index.js +0 -17
- package/dist/assertion/index.js.map +0 -1
- package/dist/assertion/slotify.cjs +0 -165
- package/dist/assertion/slotify.cjs.map +0 -1
- package/dist/assertion/slotify.d.cts +0 -11
- package/dist/assertion/slotify.d.cts.map +0 -1
- package/dist/assertion/slotify.d.ts +0 -11
- package/dist/assertion/slotify.d.ts.map +0 -1
- package/dist/assertion/slotify.js +0 -161
- package/dist/assertion/slotify.js.map +0 -1
- package/dist/bootstrap.cjs +0 -43
- package/dist/bootstrap.cjs.map +0 -1
- package/dist/bootstrap.d.cts +0 -27
- package/dist/bootstrap.d.cts.map +0 -1
- package/dist/bootstrap.d.ts +0 -27
- package/dist/bootstrap.d.ts.map +0 -1
- package/dist/bootstrap.js +0 -40
- package/dist/bootstrap.js.map +0 -1
- package/dist/constant.cjs +0 -82
- package/dist/constant.cjs.map +0 -1
- package/dist/constant.d.cts +0 -69
- package/dist/constant.d.cts.map +0 -1
- package/dist/constant.d.ts +0 -69
- package/dist/constant.d.ts.map +0 -1
- package/dist/constant.js +0 -79
- package/dist/constant.js.map +0 -1
- package/dist/diff.cjs +0 -340
- package/dist/diff.cjs.map +0 -1
- package/dist/diff.d.cts +0 -51
- package/dist/diff.d.cts.map +0 -1
- package/dist/diff.d.ts +0 -51
- package/dist/diff.d.ts.map +0 -1
- package/dist/diff.js +0 -334
- package/dist/diff.js.map +0 -1
- package/dist/error.cjs +0 -204
- package/dist/error.cjs.map +0 -1
- package/dist/error.d.cts +0 -212
- package/dist/error.d.cts.map +0 -1
- package/dist/error.d.ts +0 -212
- package/dist/error.d.ts.map +0 -1
- package/dist/error.js +0 -191
- package/dist/error.js.map +0 -1
- package/dist/expect.cjs +0 -590
- package/dist/expect.cjs.map +0 -1
- package/dist/expect.d.cts +0 -138
- package/dist/expect.d.cts.map +0 -1
- package/dist/expect.d.ts +0 -138
- package/dist/expect.d.ts.map +0 -1
- package/dist/expect.js +0 -582
- package/dist/expect.js.map +0 -1
- package/dist/guards.cjs +0 -297
- package/dist/guards.cjs.map +0 -1
- package/dist/guards.d.cts +0 -231
- package/dist/guards.d.cts.map +0 -1
- package/dist/guards.d.ts +0 -231
- package/dist/guards.d.ts.map +0 -1
- package/dist/guards.js +0 -277
- package/dist/guards.js.map +0 -1
- package/dist/index.cjs +0 -111
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -448
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.ts +0 -448
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -71
- package/dist/index.js.map +0 -1
- package/dist/internal-schema.cjs +0 -253
- package/dist/internal-schema.cjs.map +0 -1
- package/dist/internal-schema.d.cts +0 -8
- package/dist/internal-schema.d.cts.map +0 -1
- package/dist/internal-schema.d.ts +0 -8
- package/dist/internal-schema.d.ts.map +0 -1
- package/dist/internal-schema.js +0 -248
- package/dist/internal-schema.js.map +0 -1
- package/dist/metadata.cjs +0 -57
- package/dist/metadata.cjs.map +0 -1
- package/dist/metadata.d.cts +0 -27
- package/dist/metadata.d.cts.map +0 -1
- package/dist/metadata.d.ts +0 -27
- package/dist/metadata.d.ts.map +0 -1
- package/dist/metadata.js +0 -54
- package/dist/metadata.js.map +0 -1
- package/dist/schema.cjs +0 -1522
- package/dist/schema.cjs.map +0 -1
- package/dist/schema.d.cts +0 -1196
- package/dist/schema.d.cts.map +0 -1
- package/dist/schema.d.ts +0 -1196
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -1516
- package/dist/schema.js.map +0 -1
- package/dist/snapshot/adapter.cjs +0 -31
- package/dist/snapshot/adapter.cjs.map +0 -1
- package/dist/snapshot/adapter.d.cts +0 -258
- package/dist/snapshot/adapter.d.cts.map +0 -1
- package/dist/snapshot/adapter.d.ts +0 -258
- package/dist/snapshot/adapter.d.ts.map +0 -1
- package/dist/snapshot/adapter.js +0 -27
- package/dist/snapshot/adapter.js.map +0 -1
- package/dist/snapshot/adapters/fallback.cjs +0 -453
- package/dist/snapshot/adapters/fallback.cjs.map +0 -1
- package/dist/snapshot/adapters/fallback.d.cts +0 -185
- package/dist/snapshot/adapters/fallback.d.cts.map +0 -1
- package/dist/snapshot/adapters/fallback.d.ts +0 -185
- package/dist/snapshot/adapters/fallback.d.ts.map +0 -1
- package/dist/snapshot/adapters/fallback.js +0 -446
- package/dist/snapshot/adapters/fallback.js.map +0 -1
- package/dist/snapshot/adapters/node-test.cjs +0 -301
- package/dist/snapshot/adapters/node-test.cjs.map +0 -1
- package/dist/snapshot/adapters/node-test.d.cts +0 -131
- package/dist/snapshot/adapters/node-test.d.cts.map +0 -1
- package/dist/snapshot/adapters/node-test.d.ts +0 -131
- package/dist/snapshot/adapters/node-test.d.ts.map +0 -1
- package/dist/snapshot/adapters/node-test.js +0 -297
- package/dist/snapshot/adapters/node-test.js.map +0 -1
- package/dist/snapshot/index.cjs +0 -61
- package/dist/snapshot/index.cjs.map +0 -1
- package/dist/snapshot/index.d.cts +0 -40
- package/dist/snapshot/index.d.cts.map +0 -1
- package/dist/snapshot/index.d.ts +0 -40
- package/dist/snapshot/index.d.ts.map +0 -1
- package/dist/snapshot/index.js +0 -44
- package/dist/snapshot/index.js.map +0 -1
- package/dist/snapshot/node-version.cjs +0 -49
- package/dist/snapshot/node-version.cjs.map +0 -1
- package/dist/snapshot/node-version.d.cts +0 -34
- package/dist/snapshot/node-version.d.cts.map +0 -1
- package/dist/snapshot/node-version.d.ts +0 -34
- package/dist/snapshot/node-version.d.ts.map +0 -1
- package/dist/snapshot/node-version.js +0 -44
- package/dist/snapshot/node-version.js.map +0 -1
- package/dist/snapshot/select-adapter.cjs +0 -170
- package/dist/snapshot/select-adapter.cjs.map +0 -1
- package/dist/snapshot/select-adapter.d.cts +0 -128
- package/dist/snapshot/select-adapter.d.cts.map +0 -1
- package/dist/snapshot/select-adapter.d.ts +0 -128
- package/dist/snapshot/select-adapter.d.ts.map +0 -1
- package/dist/snapshot/select-adapter.js +0 -164
- package/dist/snapshot/select-adapter.js.map +0 -1
- package/dist/snapshot/serializer.cjs +0 -246
- package/dist/snapshot/serializer.cjs.map +0 -1
- package/dist/snapshot/serializer.d.cts +0 -126
- package/dist/snapshot/serializer.d.cts.map +0 -1
- package/dist/snapshot/serializer.d.ts +0 -126
- package/dist/snapshot/serializer.d.ts.map +0 -1
- package/dist/snapshot/serializer.js +0 -238
- package/dist/snapshot/serializer.js.map +0 -1
- package/dist/standard-schema.cjs +0 -13
- package/dist/standard-schema.cjs.map +0 -1
- package/dist/standard-schema.d.cts +0 -192
- package/dist/standard-schema.d.cts.map +0 -1
- package/dist/standard-schema.d.ts +0 -192
- package/dist/standard-schema.d.ts.map +0 -1
- package/dist/standard-schema.js +0 -12
- package/dist/standard-schema.js.map +0 -1
- package/dist/types.cjs +0 -22
- package/dist/types.cjs.map +0 -1
- package/dist/types.d.cts +0 -905
- package/dist/types.d.cts.map +0 -1
- package/dist/types.d.ts +0 -905
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -21
- package/dist/types.js.map +0 -1
- package/dist/use.cjs +0 -240
- package/dist/use.cjs.map +0 -1
- package/dist/use.d.cts +0 -8
- package/dist/use.d.cts.map +0 -1
- package/dist/use.d.ts +0 -8
- package/dist/use.d.ts.map +0 -1
- package/dist/use.js +0 -236
- package/dist/use.js.map +0 -1
- package/dist/util.cjs +0 -255
- package/dist/util.cjs.map +0 -1
- package/dist/util.d.cts +0 -141
- package/dist/util.d.cts.map +0 -1
- package/dist/util.d.ts +0 -141
- package/dist/util.d.ts.map +0 -1
- package/dist/util.js +0 -234
- package/dist/util.js.map +0 -1
- package/dist/value-to-schema.cjs +0 -537
- package/dist/value-to-schema.cjs.map +0 -1
- package/dist/value-to-schema.d.cts +0 -144
- package/dist/value-to-schema.d.cts.map +0 -1
- package/dist/value-to-schema.d.ts +0 -144
- package/dist/value-to-schema.d.ts.map +0 -1
- package/dist/value-to-schema.js +0 -533
- package/dist/value-to-schema.js.map +0 -1
package/dist/expect.d.cts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { type AnyAsyncAssertions, type AnySyncAssertions } from "./assertion/assertion-types.cjs";
|
|
2
|
-
import { type Expect, type ExpectAsync, type ExpectAsyncFunction, type ExpectAsyncProps, type ExpectFunction, type ExpectSyncProps } from "./types.cjs";
|
|
3
|
-
/**
|
|
4
|
-
* Creates an asynchronous expect function by extending a parent expectAsync
|
|
5
|
-
* function with additional assertions.
|
|
6
|
-
*
|
|
7
|
-
* This overload combines assertions from an existing parent expectAsync
|
|
8
|
-
* function with new assertions, creating a unified expectAsync function that
|
|
9
|
-
* supports both sets of assertions. The resulting function inherits all type
|
|
10
|
-
* information from both the parent and new assertions, providing complete
|
|
11
|
-
* TypeScript intellisense and type safety for Promise-based testing scenarios.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
*
|
|
15
|
-
* ```typescript
|
|
16
|
-
* const baseExpectAsync = createExpectAsyncFunction(basicAsyncAssertions);
|
|
17
|
-
* const extendedExpectAsync = createExpectAsyncFunction(
|
|
18
|
-
* customAsyncAssertions,
|
|
19
|
-
* baseExpectAsync,
|
|
20
|
-
* );
|
|
21
|
-
*
|
|
22
|
-
* // Can use both basic and custom async assertions
|
|
23
|
-
* await extendedExpectAsync(promise, 'to resolve'); // From basic assertions
|
|
24
|
-
* await extendedExpectAsync(promise, 'to resolve with custom data'); // From custom assertions
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @param assertions - Array of new asynchronous assertion objects to add
|
|
28
|
-
* @param expect - Parent expectAsync function whose assertions will be
|
|
29
|
-
* inherited
|
|
30
|
-
* @returns ExpectAsync function with combined assertion types from both parent
|
|
31
|
-
* and new assertions
|
|
32
|
-
* @throws {@link AssertionError} When an assertion fails in normal
|
|
33
|
-
* (non-negated) mode
|
|
34
|
-
* @throws {@link NegatedAssertionError} When a negated assertion fails
|
|
35
|
-
* @throws {Error} When no matching assertion can be found for the provided
|
|
36
|
-
* arguments
|
|
37
|
-
*/
|
|
38
|
-
export declare function createExpectAsyncFunction<T extends AnyAsyncAssertions, U extends ExpectAsync<AnyAsyncAssertions>>(assertions: T, expect: U): ExpectAsyncFunction<T & U['assertions']>;
|
|
39
|
-
/**
|
|
40
|
-
* Creates a new asynchronous expect function with the provided assertions.
|
|
41
|
-
*
|
|
42
|
-
* This overload creates a standalone expectAsync function from the provided
|
|
43
|
-
* assertions without inheriting from any parent function. This is typically
|
|
44
|
-
* used to create the initial expectAsync function or when you want a clean
|
|
45
|
-
* slate without any inherited assertions for Promise-based testing.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
*
|
|
49
|
-
* ```typescript
|
|
50
|
-
* const expectAsync = createExpectAsyncFunction(asyncAssertions);
|
|
51
|
-
* await expectAsync(promise, 'to resolve');
|
|
52
|
-
* await expectAsync(rejectedPromise, 'to reject');
|
|
53
|
-
* await expectAsync(promise, 'to resolve to', expectedValue);
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* @param assertions - Array of asynchronous assertion objects that define the
|
|
57
|
-
* available assertion phrases and Promise-based logic
|
|
58
|
-
* @returns An asynchronous expect function that can execute the provided
|
|
59
|
-
* assertions using natural language syntax
|
|
60
|
-
* @throws {@link AssertionError} When an assertion fails in normal
|
|
61
|
-
* (non-negated) mode
|
|
62
|
-
* @throws {@link NegatedAssertionError} When a negated assertion fails
|
|
63
|
-
* @throws {Error} When no matching assertion can be found for the provided
|
|
64
|
-
* arguments
|
|
65
|
-
*/
|
|
66
|
-
export declare function createExpectAsyncFunction<T extends AnyAsyncAssertions>(assertions: T): ExpectAsyncFunction<T>;
|
|
67
|
-
/**
|
|
68
|
-
* Creates a synchronous expect function by extending a parent expect function
|
|
69
|
-
* with additional assertions.
|
|
70
|
-
*
|
|
71
|
-
* This overload combines assertions from an existing parent expect function
|
|
72
|
-
* with new assertions, creating a unified expect function that supports both
|
|
73
|
-
* sets of assertions. The resulting function inherits all type information from
|
|
74
|
-
* both the parent and new assertions, providing complete TypeScript
|
|
75
|
-
* intellisense and type safety.
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
*
|
|
79
|
-
* ```typescript
|
|
80
|
-
* const baseExpect = createExpectSyncFunction(basicAssertions);
|
|
81
|
-
* const extendedExpect = createExpectSyncFunction(
|
|
82
|
-
* customAssertions,
|
|
83
|
-
* baseExpect,
|
|
84
|
-
* );
|
|
85
|
-
*
|
|
86
|
-
* // Can use both basic and custom assertions
|
|
87
|
-
* extendedExpect(42, 'to be a number'); // From basic assertions
|
|
88
|
-
* extendedExpect(obj, 'to have custom prop'); // From custom assertions
|
|
89
|
-
* ```
|
|
90
|
-
*
|
|
91
|
-
* @param assertions - Array of new synchronous assertion objects to add
|
|
92
|
-
* @param expect - Parent expect function whose assertions will be inherited
|
|
93
|
-
* @returns Expect function with combined assertion types from both parent and
|
|
94
|
-
* new assertions
|
|
95
|
-
* @throws {@link AssertionError} When an assertion fails in normal
|
|
96
|
-
* (non-negated) mode
|
|
97
|
-
* @throws {@link NegatedAssertionError} When a negated assertion fails
|
|
98
|
-
* @throws {Error} When no matching assertion can be found for the provided
|
|
99
|
-
* arguments
|
|
100
|
-
*/
|
|
101
|
-
export declare function createExpectSyncFunction<Assertions extends AnySyncAssertions, ParentExpect extends Expect<AnySyncAssertions>>(assertions: Assertions, expect: ParentExpect): ExpectFunction<Assertions & ParentExpect['assertions']>;
|
|
102
|
-
/**
|
|
103
|
-
* Creates a new synchronous expect function with the provided assertions.
|
|
104
|
-
*
|
|
105
|
-
* This overload creates a standalone expect function from the provided
|
|
106
|
-
* assertions without inheriting from any parent function. This is typically
|
|
107
|
-
* used to create the initial expect function or when you want a clean slate
|
|
108
|
-
* without any inherited assertions.
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
*
|
|
112
|
-
* ```typescript
|
|
113
|
-
* const expect = createExpectSyncFunction(basicAssertions);
|
|
114
|
-
* expect(42, 'to be a number');
|
|
115
|
-
* expect('hello', 'to be a string');
|
|
116
|
-
* expect([], 'to be empty');
|
|
117
|
-
* ```
|
|
118
|
-
*
|
|
119
|
-
* @param assertions - Array of synchronous assertion objects that define the
|
|
120
|
-
* available assertion phrases and logic
|
|
121
|
-
* @returns A synchronous expect function that can execute the provided
|
|
122
|
-
* assertions using natural language syntax
|
|
123
|
-
* @throws {@link AssertionError} When an assertion fails in normal
|
|
124
|
-
* (non-negated) mode
|
|
125
|
-
* @throws {@link NegatedAssertionError} When a negated assertion fails
|
|
126
|
-
* @throws {Error} When no matching assertion can be found for the provided
|
|
127
|
-
* arguments
|
|
128
|
-
*/
|
|
129
|
-
export declare function createExpectSyncFunction<Assertions extends AnySyncAssertions>(assertions: Assertions): ExpectFunction<Assertions>;
|
|
130
|
-
/**
|
|
131
|
-
* Used by a {@link UseFn} to create base properties of {@link Expect}.
|
|
132
|
-
*/
|
|
133
|
-
export declare function createBaseExpect<T extends AnySyncAssertions, U extends AnyAsyncAssertions>(syncAssertions: T, asyncAssertions: U, type: 'sync'): ExpectSyncProps<T, U>;
|
|
134
|
-
/**
|
|
135
|
-
* Used by a {@link UseFn} to create base properties of {@link ExpectAsync}.
|
|
136
|
-
*/
|
|
137
|
-
export declare function createBaseExpect<T extends AnySyncAssertions, U extends AnyAsyncAssertions>(syncAssertions: T, asyncAssertions: U, type: 'async'): ExpectAsyncProps<U, T>;
|
|
138
|
-
//# sourceMappingURL=expect.d.ts.map
|
package/dist/expect.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../src/expect.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,iBAAiB,EASvB,wC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,CAC9B,CAAC,SAAS,iBAAiB,EAC3B,CAAC,SAAS,kBAAkB,EAC5B,cAAc,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
package/dist/expect.d.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { type AnyAsyncAssertions, type AnySyncAssertions } from "./assertion/assertion-types.js";
|
|
2
|
-
import { type Expect, type ExpectAsync, type ExpectAsyncFunction, type ExpectAsyncProps, type ExpectFunction, type ExpectSyncProps } from "./types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Creates an asynchronous expect function by extending a parent expectAsync
|
|
5
|
-
* function with additional assertions.
|
|
6
|
-
*
|
|
7
|
-
* This overload combines assertions from an existing parent expectAsync
|
|
8
|
-
* function with new assertions, creating a unified expectAsync function that
|
|
9
|
-
* supports both sets of assertions. The resulting function inherits all type
|
|
10
|
-
* information from both the parent and new assertions, providing complete
|
|
11
|
-
* TypeScript intellisense and type safety for Promise-based testing scenarios.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
*
|
|
15
|
-
* ```typescript
|
|
16
|
-
* const baseExpectAsync = createExpectAsyncFunction(basicAsyncAssertions);
|
|
17
|
-
* const extendedExpectAsync = createExpectAsyncFunction(
|
|
18
|
-
* customAsyncAssertions,
|
|
19
|
-
* baseExpectAsync,
|
|
20
|
-
* );
|
|
21
|
-
*
|
|
22
|
-
* // Can use both basic and custom async assertions
|
|
23
|
-
* await extendedExpectAsync(promise, 'to resolve'); // From basic assertions
|
|
24
|
-
* await extendedExpectAsync(promise, 'to resolve with custom data'); // From custom assertions
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @param assertions - Array of new asynchronous assertion objects to add
|
|
28
|
-
* @param expect - Parent expectAsync function whose assertions will be
|
|
29
|
-
* inherited
|
|
30
|
-
* @returns ExpectAsync function with combined assertion types from both parent
|
|
31
|
-
* and new assertions
|
|
32
|
-
* @throws {@link AssertionError} When an assertion fails in normal
|
|
33
|
-
* (non-negated) mode
|
|
34
|
-
* @throws {@link NegatedAssertionError} When a negated assertion fails
|
|
35
|
-
* @throws {Error} When no matching assertion can be found for the provided
|
|
36
|
-
* arguments
|
|
37
|
-
*/
|
|
38
|
-
export declare function createExpectAsyncFunction<T extends AnyAsyncAssertions, U extends ExpectAsync<AnyAsyncAssertions>>(assertions: T, expect: U): ExpectAsyncFunction<T & U['assertions']>;
|
|
39
|
-
/**
|
|
40
|
-
* Creates a new asynchronous expect function with the provided assertions.
|
|
41
|
-
*
|
|
42
|
-
* This overload creates a standalone expectAsync function from the provided
|
|
43
|
-
* assertions without inheriting from any parent function. This is typically
|
|
44
|
-
* used to create the initial expectAsync function or when you want a clean
|
|
45
|
-
* slate without any inherited assertions for Promise-based testing.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
*
|
|
49
|
-
* ```typescript
|
|
50
|
-
* const expectAsync = createExpectAsyncFunction(asyncAssertions);
|
|
51
|
-
* await expectAsync(promise, 'to resolve');
|
|
52
|
-
* await expectAsync(rejectedPromise, 'to reject');
|
|
53
|
-
* await expectAsync(promise, 'to resolve to', expectedValue);
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* @param assertions - Array of asynchronous assertion objects that define the
|
|
57
|
-
* available assertion phrases and Promise-based logic
|
|
58
|
-
* @returns An asynchronous expect function that can execute the provided
|
|
59
|
-
* assertions using natural language syntax
|
|
60
|
-
* @throws {@link AssertionError} When an assertion fails in normal
|
|
61
|
-
* (non-negated) mode
|
|
62
|
-
* @throws {@link NegatedAssertionError} When a negated assertion fails
|
|
63
|
-
* @throws {Error} When no matching assertion can be found for the provided
|
|
64
|
-
* arguments
|
|
65
|
-
*/
|
|
66
|
-
export declare function createExpectAsyncFunction<T extends AnyAsyncAssertions>(assertions: T): ExpectAsyncFunction<T>;
|
|
67
|
-
/**
|
|
68
|
-
* Creates a synchronous expect function by extending a parent expect function
|
|
69
|
-
* with additional assertions.
|
|
70
|
-
*
|
|
71
|
-
* This overload combines assertions from an existing parent expect function
|
|
72
|
-
* with new assertions, creating a unified expect function that supports both
|
|
73
|
-
* sets of assertions. The resulting function inherits all type information from
|
|
74
|
-
* both the parent and new assertions, providing complete TypeScript
|
|
75
|
-
* intellisense and type safety.
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
*
|
|
79
|
-
* ```typescript
|
|
80
|
-
* const baseExpect = createExpectSyncFunction(basicAssertions);
|
|
81
|
-
* const extendedExpect = createExpectSyncFunction(
|
|
82
|
-
* customAssertions,
|
|
83
|
-
* baseExpect,
|
|
84
|
-
* );
|
|
85
|
-
*
|
|
86
|
-
* // Can use both basic and custom assertions
|
|
87
|
-
* extendedExpect(42, 'to be a number'); // From basic assertions
|
|
88
|
-
* extendedExpect(obj, 'to have custom prop'); // From custom assertions
|
|
89
|
-
* ```
|
|
90
|
-
*
|
|
91
|
-
* @param assertions - Array of new synchronous assertion objects to add
|
|
92
|
-
* @param expect - Parent expect function whose assertions will be inherited
|
|
93
|
-
* @returns Expect function with combined assertion types from both parent and
|
|
94
|
-
* new assertions
|
|
95
|
-
* @throws {@link AssertionError} When an assertion fails in normal
|
|
96
|
-
* (non-negated) mode
|
|
97
|
-
* @throws {@link NegatedAssertionError} When a negated assertion fails
|
|
98
|
-
* @throws {Error} When no matching assertion can be found for the provided
|
|
99
|
-
* arguments
|
|
100
|
-
*/
|
|
101
|
-
export declare function createExpectSyncFunction<Assertions extends AnySyncAssertions, ParentExpect extends Expect<AnySyncAssertions>>(assertions: Assertions, expect: ParentExpect): ExpectFunction<Assertions & ParentExpect['assertions']>;
|
|
102
|
-
/**
|
|
103
|
-
* Creates a new synchronous expect function with the provided assertions.
|
|
104
|
-
*
|
|
105
|
-
* This overload creates a standalone expect function from the provided
|
|
106
|
-
* assertions without inheriting from any parent function. This is typically
|
|
107
|
-
* used to create the initial expect function or when you want a clean slate
|
|
108
|
-
* without any inherited assertions.
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
*
|
|
112
|
-
* ```typescript
|
|
113
|
-
* const expect = createExpectSyncFunction(basicAssertions);
|
|
114
|
-
* expect(42, 'to be a number');
|
|
115
|
-
* expect('hello', 'to be a string');
|
|
116
|
-
* expect([], 'to be empty');
|
|
117
|
-
* ```
|
|
118
|
-
*
|
|
119
|
-
* @param assertions - Array of synchronous assertion objects that define the
|
|
120
|
-
* available assertion phrases and logic
|
|
121
|
-
* @returns A synchronous expect function that can execute the provided
|
|
122
|
-
* assertions using natural language syntax
|
|
123
|
-
* @throws {@link AssertionError} When an assertion fails in normal
|
|
124
|
-
* (non-negated) mode
|
|
125
|
-
* @throws {@link NegatedAssertionError} When a negated assertion fails
|
|
126
|
-
* @throws {Error} When no matching assertion can be found for the provided
|
|
127
|
-
* arguments
|
|
128
|
-
*/
|
|
129
|
-
export declare function createExpectSyncFunction<Assertions extends AnySyncAssertions>(assertions: Assertions): ExpectFunction<Assertions>;
|
|
130
|
-
/**
|
|
131
|
-
* Used by a {@link UseFn} to create base properties of {@link Expect}.
|
|
132
|
-
*/
|
|
133
|
-
export declare function createBaseExpect<T extends AnySyncAssertions, U extends AnyAsyncAssertions>(syncAssertions: T, asyncAssertions: U, type: 'sync'): ExpectSyncProps<T, U>;
|
|
134
|
-
/**
|
|
135
|
-
* Used by a {@link UseFn} to create base properties of {@link ExpectAsync}.
|
|
136
|
-
*/
|
|
137
|
-
export declare function createBaseExpect<T extends AnySyncAssertions, U extends AnyAsyncAssertions>(syncAssertions: T, asyncAssertions: U, type: 'async'): ExpectAsyncProps<U, T>;
|
|
138
|
-
//# sourceMappingURL=expect.d.ts.map
|
package/dist/expect.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../src/expect.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,iBAAi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