bupkis 0.18.0 → 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 +14 -0
- package/package.json +1 -4
- package/src/assertion/assertion-types.ts +4 -4
- package/src/assertion/impl/async-parametric.ts +4 -21
- package/src/assertion/impl/sync-parametric.ts +5 -17
- 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 -423
- 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 -420
- 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 -812
- 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 -809
- 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
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adapter for node:test's built-in snapshot support.
|
|
3
|
-
*
|
|
4
|
-
* Node.js native test runner includes snapshot testing capabilities as of
|
|
5
|
-
* Node.js v22. This adapter delegates to node:test's native `assert.snapshot()`
|
|
6
|
-
* function while providing the unified BUPKIS snapshot interface.
|
|
7
|
-
*
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @see https://nodejs.org/api/test.html#snapshots
|
|
10
|
-
*/
|
|
11
|
-
import { AssertionError as NodeTestAssertionError } from 'node:assert';
|
|
12
|
-
import { inspect } from 'node:util';
|
|
13
|
-
import { isA, isError } from "../../guards.js";
|
|
14
|
-
import { isTestContext } from "../adapter.js";
|
|
15
|
-
import { assertNodeVersion } from "../node-version.js";
|
|
16
|
-
import { defaultSerializer } from "../serializer.js";
|
|
17
|
-
/**
|
|
18
|
-
* Adapter for node:test snapshot support.
|
|
19
|
-
*
|
|
20
|
-
* This adapter leverages node:test's native snapshot functionality while
|
|
21
|
-
* providing the unified BUPKIS snapshot interface. It's the preferred adapter
|
|
22
|
-
* when running tests with node:test.
|
|
23
|
-
*
|
|
24
|
-
* **Features:**
|
|
25
|
-
*
|
|
26
|
-
* - Delegates to native `assert.snapshot()`
|
|
27
|
-
* - Supports custom serializers
|
|
28
|
-
* - Automatically detects update mode from CLI flags
|
|
29
|
-
* - Zero configuration required
|
|
30
|
-
*
|
|
31
|
-
* **Detection:** The adapter detects node:test by checking for
|
|
32
|
-
* `context.assert.snapshot`.
|
|
33
|
-
*
|
|
34
|
-
* **Update Mode:** Respects the `--test-update-snapshots` flag.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
*
|
|
38
|
-
* ```typescript
|
|
39
|
-
* import test from 'node:test';
|
|
40
|
-
* import { expect } from 'bupkis';
|
|
41
|
-
*
|
|
42
|
-
* test('renders component', (t) => {
|
|
43
|
-
* const output = render(<MyComponent />);
|
|
44
|
-
* expect(output, 'to match snapshot', t);
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
*
|
|
50
|
-
* ```typescript
|
|
51
|
-
* // With custom serializer
|
|
52
|
-
* test('redacts secrets', (t) => {
|
|
53
|
-
* const data = { public: 'visible', secret: 'password123' };
|
|
54
|
-
* expect(data, 'to match snapshot', t, {
|
|
55
|
-
* serializer: (value: any) =>
|
|
56
|
-
* JSON.stringify({ ...value, secret: '[REDACTED]' }, null, 2),
|
|
57
|
-
* });
|
|
58
|
-
* });
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
|
-
export class NodeTestAdapter {
|
|
62
|
-
/**
|
|
63
|
-
* Adapter name for identification and debugging.
|
|
64
|
-
*/
|
|
65
|
-
name = 'node:test';
|
|
66
|
-
/**
|
|
67
|
-
* Check if this adapter can handle the given context.
|
|
68
|
-
*
|
|
69
|
-
* Returns `true` if the context has the structure of a node:test context,
|
|
70
|
-
* specifically checking for `context.assert.snapshot`.
|
|
71
|
-
*
|
|
72
|
-
* @param context - Test context to check
|
|
73
|
-
* @returns `true` if this is a node:test context
|
|
74
|
-
* @throws {Error} If running on Node.js < 22 with a node:test context
|
|
75
|
-
*/
|
|
76
|
-
canHandle(context) {
|
|
77
|
-
if (looksLikeNodeTestContext(context) && !isNodeTestContext(context)) {
|
|
78
|
-
assertNodeVersion();
|
|
79
|
-
}
|
|
80
|
-
return isNodeTestContext(context);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Extract snapshot context from node:test context.
|
|
84
|
-
*
|
|
85
|
-
* Extracts:
|
|
86
|
-
*
|
|
87
|
-
* - **testPath**: The test name from `context.name`
|
|
88
|
-
* - **filePath**: Extracted from stack trace
|
|
89
|
-
* - **isUpdateMode**: Detected from `--test-update-snapshots` flag
|
|
90
|
-
*
|
|
91
|
-
* @param context - Node:test context object
|
|
92
|
-
* @returns Normalized snapshot context
|
|
93
|
-
* @throws {TypeError} If context is not a valid node:test context
|
|
94
|
-
*/
|
|
95
|
-
getContext(context) {
|
|
96
|
-
if (!isNodeTestContext(context)) {
|
|
97
|
-
throw new TypeError('Invalid node:test context');
|
|
98
|
-
}
|
|
99
|
-
return {
|
|
100
|
-
filePath: getTestFilePathFromStack(),
|
|
101
|
-
isUpdateMode: isNodeTestUpdateMode(),
|
|
102
|
-
testPath: context.name,
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Perform snapshot assertion using node:test's native functionality.
|
|
107
|
-
*
|
|
108
|
-
* This method delegates to `context.assert.snapshot()`, which handles:
|
|
109
|
-
*
|
|
110
|
-
* - Snapshot file creation and management
|
|
111
|
-
* - Snapshot comparison
|
|
112
|
-
* - Update mode behavior
|
|
113
|
-
* - Error messages and diffs
|
|
114
|
-
*
|
|
115
|
-
* If a custom serializer is provided in options, it will be passed to
|
|
116
|
-
* node:test as a serializer function.
|
|
117
|
-
*
|
|
118
|
-
* @example
|
|
119
|
-
*
|
|
120
|
-
* ```typescript
|
|
121
|
-
* const adapter = new NodeTestAdapter();
|
|
122
|
-
* adapter.assertSnapshot({ foo: 'bar' }, testContext);
|
|
123
|
-
* ```
|
|
124
|
-
*
|
|
125
|
-
* @param value - Value to snapshot
|
|
126
|
-
* @param context - Node:test context object
|
|
127
|
-
* @param options - Optional serialization options
|
|
128
|
-
* @throws {TypeError} If context is not a valid node:test context
|
|
129
|
-
* @throws {AssertionError} If snapshot doesn't match (via node:test)
|
|
130
|
-
*/
|
|
131
|
-
validateSnapshot(value, context, options) {
|
|
132
|
-
if (!isNodeTestContext(context)) {
|
|
133
|
-
throw new TypeError('Invalid node:test context');
|
|
134
|
-
}
|
|
135
|
-
// Use custom serializer if provided, otherwise use default serializer
|
|
136
|
-
// to handle circular references and special types
|
|
137
|
-
const serializers = options?.serializer
|
|
138
|
-
? [options.serializer]
|
|
139
|
-
: [defaultSerializer];
|
|
140
|
-
try {
|
|
141
|
-
// Build snapshot options - include hint as name if provided
|
|
142
|
-
const snapshotOptions = { serializers };
|
|
143
|
-
if (options?.hint) {
|
|
144
|
-
snapshotOptions.name = options.hint;
|
|
145
|
-
}
|
|
146
|
-
context.assert.snapshot(value, snapshotOptions);
|
|
147
|
-
}
|
|
148
|
-
catch (err) {
|
|
149
|
-
if (isNodeAssertionError(err)) {
|
|
150
|
-
return {
|
|
151
|
-
actual: err.actual,
|
|
152
|
-
expected: err.expected,
|
|
153
|
-
message: err.message,
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
if (isError(err)) {
|
|
157
|
-
return {
|
|
158
|
-
message: err.message,
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
return {
|
|
162
|
-
message: inspect(err),
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Extract the test file path from the stack trace.
|
|
169
|
-
*
|
|
170
|
-
* This is a fallback method used when the test context doesn't provide the file
|
|
171
|
-
* path directly. It searches the stack trace for lines that look like test file
|
|
172
|
-
* paths (containing `.test.` or `.spec.`).
|
|
173
|
-
*
|
|
174
|
-
* @example
|
|
175
|
-
*
|
|
176
|
-
* ```typescript
|
|
177
|
-
* // If called from /path/to/my.test.ts, returns '/path/to/my.test.ts'
|
|
178
|
-
* const filePath = getTestFilePathFromStack();
|
|
179
|
-
* ```
|
|
180
|
-
*
|
|
181
|
-
* @function
|
|
182
|
-
* @returns Absolute file path, or 'unknown' if not found
|
|
183
|
-
*/
|
|
184
|
-
const getTestFilePathFromStack = () => {
|
|
185
|
-
const stack = new Error().stack || '';
|
|
186
|
-
const lines = stack.split('\n');
|
|
187
|
-
// Look for first line that looks like a test file
|
|
188
|
-
for (const line of lines) {
|
|
189
|
-
const match = line.match(/\((.+\.(?:test|spec)\.[jt]s):\d+:\d+\)/);
|
|
190
|
-
if (match && match[1]) {
|
|
191
|
-
return match[1];
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
return 'unknown';
|
|
195
|
-
};
|
|
196
|
-
/**
|
|
197
|
-
* Check if a value looks like a node:test context (has `name` and `assert`
|
|
198
|
-
* properties).
|
|
199
|
-
*
|
|
200
|
-
* This is used to detect when someone is passing a node:test context on an
|
|
201
|
-
* older Node.js version that doesn't support `assert.snapshot`.
|
|
202
|
-
*
|
|
203
|
-
* @function
|
|
204
|
-
* @param value - Value to check
|
|
205
|
-
* @returns `true` if value looks like a node:test context
|
|
206
|
-
*/
|
|
207
|
-
const looksLikeNodeTestContext = (value) => {
|
|
208
|
-
return (isTestContext(value) &&
|
|
209
|
-
'name' in value &&
|
|
210
|
-
typeof value.name === 'string' &&
|
|
211
|
-
'assert' in value &&
|
|
212
|
-
typeof value.assert === 'object' &&
|
|
213
|
-
value.assert !== null);
|
|
214
|
-
};
|
|
215
|
-
/**
|
|
216
|
-
* Type guard for node:test context.
|
|
217
|
-
*
|
|
218
|
-
* Checks if the given value is a valid node:test test context by verifying the
|
|
219
|
-
* presence of required properties.
|
|
220
|
-
*
|
|
221
|
-
* @example
|
|
222
|
-
*
|
|
223
|
-
* ```typescript
|
|
224
|
-
* if (isNodeTestContext(context)) {
|
|
225
|
-
* context.assert.snapshot(value);
|
|
226
|
-
* }
|
|
227
|
-
* ```
|
|
228
|
-
*
|
|
229
|
-
* @function
|
|
230
|
-
* @param value - Value to check
|
|
231
|
-
* @returns `true` if value is a node:test context
|
|
232
|
-
*/
|
|
233
|
-
const isNodeTestContext = (value) => {
|
|
234
|
-
return (isTestContext(value) &&
|
|
235
|
-
'assert' in value &&
|
|
236
|
-
typeof value.assert === 'object' &&
|
|
237
|
-
value.assert !== null &&
|
|
238
|
-
'snapshot' in value.assert &&
|
|
239
|
-
typeof value.assert.snapshot === 'function');
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* Check if we're running in node:test update mode.
|
|
243
|
-
*
|
|
244
|
-
* Node:test uses the `--test-update-snapshots` flag to indicate that snapshots
|
|
245
|
-
* should be updated rather than compared. This function also respects the
|
|
246
|
-
* `BUPKIS_UPDATE_SNAPSHOTS` environment variable for consistency with other
|
|
247
|
-
* adapters.
|
|
248
|
-
*
|
|
249
|
-
* This function checks:
|
|
250
|
-
*
|
|
251
|
-
* 1. `process.execArgv` (flags passed to Node.js)
|
|
252
|
-
* 2. `process.argv` (arguments passed to the script)
|
|
253
|
-
* 3. `BUPKIS_UPDATE_SNAPSHOTS` environment variable
|
|
254
|
-
*
|
|
255
|
-
* @example
|
|
256
|
-
*
|
|
257
|
-
* ```sh
|
|
258
|
-
* # These commands will trigger update mode:
|
|
259
|
-
* node --test --test-update-snapshots
|
|
260
|
-
* node --test-update-snapshots=true --test test.js
|
|
261
|
-
* BUPKIS_UPDATE_SNAPSHOTS=1 node --test
|
|
262
|
-
* ```
|
|
263
|
-
*
|
|
264
|
-
* @function
|
|
265
|
-
* @returns `true` if in update mode
|
|
266
|
-
*/
|
|
267
|
-
const isNodeTestUpdateMode = () => {
|
|
268
|
-
// Check for BUPKIS_UPDATE_SNAPSHOTS environment variable
|
|
269
|
-
if (process.env.BUPKIS_UPDATE_SNAPSHOTS === '1') {
|
|
270
|
-
return true;
|
|
271
|
-
}
|
|
272
|
-
// Check for --test-update-snapshots flag in exec args or argv
|
|
273
|
-
return (process.execArgv.some((arg) => arg === '--test-update-snapshots' ||
|
|
274
|
-
arg.startsWith('--test-update-snapshots=')) ||
|
|
275
|
-
process.argv.some((arg) => arg === '--test-update-snapshots' ||
|
|
276
|
-
arg.startsWith('--test-update-snapshots=')));
|
|
277
|
-
};
|
|
278
|
-
/**
|
|
279
|
-
* Singleton instance of the node:test adapter.
|
|
280
|
-
*
|
|
281
|
-
* This is the primary export and should be used for adapter registration.
|
|
282
|
-
*
|
|
283
|
-
* @example
|
|
284
|
-
*
|
|
285
|
-
* ```typescript
|
|
286
|
-
* import { nodeTestAdapter } from 'bupkis/snapshot';
|
|
287
|
-
* import { registerAdapter } from 'bupkis/snapshot';
|
|
288
|
-
*
|
|
289
|
-
* registerAdapter(nodeTestAdapter);
|
|
290
|
-
* ```
|
|
291
|
-
*/
|
|
292
|
-
export const nodeTestAdapter = new NodeTestAdapter();
|
|
293
|
-
/**
|
|
294
|
-
* @function
|
|
295
|
-
*/
|
|
296
|
-
const isNodeAssertionError = (value) => isA(value, NodeTestAssertionError);
|
|
297
|
-
//# sourceMappingURL=node-test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-test.js","sourceRoot":"","sources":["../../../src/snapshot/adapters/node-test.ts"],"names":[],"mappings":"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"}
|
package/dist/snapshot/index.cjs
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Snapshot testing utilities for BUPKIS.
|
|
4
|
-
*
|
|
5
|
-
* This module provides unified snapshot testing across multiple test frameworks
|
|
6
|
-
* including node:test, Jest, Vitest, Mocha, and custom test runners.
|
|
7
|
-
*
|
|
8
|
-
* **Quick Start:**
|
|
9
|
-
*
|
|
10
|
-
* ```typescript
|
|
11
|
-
* import test from 'node:test';
|
|
12
|
-
* import { expect } from 'bupkis';
|
|
13
|
-
*
|
|
14
|
-
* test('component renders correctly', (t) => {
|
|
15
|
-
* const output = renderComponent();
|
|
16
|
-
* expect(output, 'to match snapshot', t);
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* **Key Features:**
|
|
21
|
-
*
|
|
22
|
-
* - Unified API across all frameworks
|
|
23
|
-
* - Automatic framework detection
|
|
24
|
-
* - Custom serialization support
|
|
25
|
-
* - Multiple snapshots per test
|
|
26
|
-
* - Chainable with other assertions
|
|
27
|
-
*
|
|
28
|
-
* @packageDocumentation
|
|
29
|
-
* @see {@link snapshotAssertion} for the main snapshot assertion
|
|
30
|
-
* @see {@link SnapshotAdapter} for custom adapter implementation
|
|
31
|
-
* @see {@link defaultSerializer} for serialization utilities
|
|
32
|
-
*/
|
|
33
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.nodeTestCompatibleSerializer = exports.defaultSerializer = exports.selectAdapter = exports.registerAdapter = exports.getRegisteredAdapters = exports.supportsNodeTestSnapshots = exports.MIN_NODE_MAJOR_VERSION = exports.getNodeMajorVersion = exports.assertNodeVersion = exports.nodeTestAdapter = exports.fallbackAdapter = exports.isTestContext = exports.SnapshotAssertions = exports.snapshotAssertion = void 0;
|
|
35
|
-
// Snapshot assertion (re-export from assertion module for convenience)
|
|
36
|
-
var snapshot_js_1 = require("../assertion/impl/snapshot.cjs");
|
|
37
|
-
Object.defineProperty(exports, "snapshotAssertion", { enumerable: true, get: function () { return snapshot_js_1.snapshotAssertion; } });
|
|
38
|
-
Object.defineProperty(exports, "SnapshotAssertions", { enumerable: true, get: function () { return snapshot_js_1.SnapshotAssertions; } });
|
|
39
|
-
var adapter_js_1 = require("./adapter.cjs");
|
|
40
|
-
Object.defineProperty(exports, "isTestContext", { enumerable: true, get: function () { return adapter_js_1.isTestContext; } });
|
|
41
|
-
// Built-in adapters
|
|
42
|
-
var fallback_js_1 = require("./adapters/fallback.cjs");
|
|
43
|
-
Object.defineProperty(exports, "fallbackAdapter", { enumerable: true, get: function () { return fallback_js_1.fallbackAdapter; } });
|
|
44
|
-
var node_test_js_1 = require("./adapters/node-test.cjs");
|
|
45
|
-
Object.defineProperty(exports, "nodeTestAdapter", { enumerable: true, get: function () { return node_test_js_1.nodeTestAdapter; } });
|
|
46
|
-
// Node.js version utilities
|
|
47
|
-
var node_version_js_1 = require("./node-version.cjs");
|
|
48
|
-
Object.defineProperty(exports, "assertNodeVersion", { enumerable: true, get: function () { return node_version_js_1.assertNodeVersion; } });
|
|
49
|
-
Object.defineProperty(exports, "getNodeMajorVersion", { enumerable: true, get: function () { return node_version_js_1.getNodeMajorVersion; } });
|
|
50
|
-
Object.defineProperty(exports, "MIN_NODE_MAJOR_VERSION", { enumerable: true, get: function () { return node_version_js_1.MIN_NODE_MAJOR_VERSION; } });
|
|
51
|
-
Object.defineProperty(exports, "supportsNodeTestSnapshots", { enumerable: true, get: function () { return node_version_js_1.supportsNodeTestSnapshots; } });
|
|
52
|
-
// Adapter selection
|
|
53
|
-
var select_adapter_js_1 = require("./select-adapter.cjs");
|
|
54
|
-
Object.defineProperty(exports, "getRegisteredAdapters", { enumerable: true, get: function () { return select_adapter_js_1.getRegisteredAdapters; } });
|
|
55
|
-
Object.defineProperty(exports, "registerAdapter", { enumerable: true, get: function () { return select_adapter_js_1.registerAdapter; } });
|
|
56
|
-
Object.defineProperty(exports, "selectAdapter", { enumerable: true, get: function () { return select_adapter_js_1.selectAdapter; } });
|
|
57
|
-
// Serialization
|
|
58
|
-
var serializer_js_1 = require("./serializer.cjs");
|
|
59
|
-
Object.defineProperty(exports, "defaultSerializer", { enumerable: true, get: function () { return serializer_js_1.defaultSerializer; } });
|
|
60
|
-
Object.defineProperty(exports, "nodeTestCompatibleSerializer", { enumerable: true, get: function () { return serializer_js_1.nodeTestCompatibleSerializer; } });
|
|
61
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/snapshot/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;;;AAEH,uEAAuE;AACvE,8DAIuC;AAHrC,gHAAA,iBAAiB,OAAA;AACjB,iHAAA,kBAAkB,OAAA;AAYpB,4CAA6C;AAApC,2GAAA,aAAa,OAAA;AAEtB,oBAAoB;AACpB,uDAA+E;AAAtE,8GAAA,eAAe,OAAA;AAExB,yDAAgF;AAAvE,+GAAA,eAAe,OAAA;AAExB,4BAA4B;AAC5B,sDAK2B;AAJzB,oHAAA,iBAAiB,OAAA;AACjB,sHAAA,mBAAmB,OAAA;AACnB,yHAAA,sBAAsB,OAAA;AACtB,4HAAA,yBAAyB,OAAA;AAG3B,oBAAoB;AACpB,0DAI6B;AAH3B,0HAAA,qBAAqB,OAAA;AACrB,oHAAA,eAAe,OAAA;AACf,kHAAA,aAAa,OAAA;AAGf,gBAAgB;AAChB,kDAIyB;AAHvB,kHAAA,iBAAiB,OAAA;AACjB,6HAAA,4BAA4B,OAAA"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Snapshot testing utilities for BUPKIS.
|
|
3
|
-
*
|
|
4
|
-
* This module provides unified snapshot testing across multiple test frameworks
|
|
5
|
-
* including node:test, Jest, Vitest, Mocha, and custom test runners.
|
|
6
|
-
*
|
|
7
|
-
* **Quick Start:**
|
|
8
|
-
*
|
|
9
|
-
* ```typescript
|
|
10
|
-
* import test from 'node:test';
|
|
11
|
-
* import { expect } from 'bupkis';
|
|
12
|
-
*
|
|
13
|
-
* test('component renders correctly', (t) => {
|
|
14
|
-
* const output = renderComponent();
|
|
15
|
-
* expect(output, 'to match snapshot', t);
|
|
16
|
-
* });
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* **Key Features:**
|
|
20
|
-
*
|
|
21
|
-
* - Unified API across all frameworks
|
|
22
|
-
* - Automatic framework detection
|
|
23
|
-
* - Custom serialization support
|
|
24
|
-
* - Multiple snapshots per test
|
|
25
|
-
* - Chainable with other assertions
|
|
26
|
-
*
|
|
27
|
-
* @packageDocumentation
|
|
28
|
-
* @see {@link snapshotAssertion} for the main snapshot assertion
|
|
29
|
-
* @see {@link SnapshotAdapter} for custom adapter implementation
|
|
30
|
-
* @see {@link defaultSerializer} for serialization utilities
|
|
31
|
-
*/
|
|
32
|
-
export { snapshotAssertion, SnapshotAssertions, type SnapshotAssertions as SnapshotAssertionsType, } from "../assertion/impl/snapshot.cjs";
|
|
33
|
-
export type { SnapshotAdapter, SnapshotContext, SnapshotOptions, SnapshotSerializer, } from "./adapter.cjs";
|
|
34
|
-
export { isTestContext } from "./adapter.cjs";
|
|
35
|
-
export { fallbackAdapter, type FallbackAdapter } from "./adapters/fallback.cjs";
|
|
36
|
-
export { nodeTestAdapter, type NodeTestAdapter } from "./adapters/node-test.cjs";
|
|
37
|
-
export { assertNodeVersion, getNodeMajorVersion, MIN_NODE_MAJOR_VERSION, supportsNodeTestSnapshots, } from "./node-version.cjs";
|
|
38
|
-
export { getRegisteredAdapters, registerAdapter, selectAdapter, } from "./select-adapter.cjs";
|
|
39
|
-
export { defaultSerializer, nodeTestCompatibleSerializer, type SerializerOptions, } from "./serializer.cjs";
|
|
40
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/snapshot/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,kBAAkB,IAAI,sBAAsB,GAClD,uCAAsC;AAGvC,YAAY,EACV,eAAe,EACf,eAAe,EACf,eAAe,EACf,kBAAkB,GACnB,sBAAqB;AAEtB,OAAO,EAAE,aAAa,EAAE,sBAAqB;AAG7C,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,gCAA+B;AAE/E,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,iCAAgC;AAGhF,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,GAC1B,2BAA0B;AAG3B,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,aAAa,GACd,6BAA4B;AAG7B,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAC5B,KAAK,iBAAiB,GACvB,yBAAwB"}
|
package/dist/snapshot/index.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Snapshot testing utilities for BUPKIS.
|
|
3
|
-
*
|
|
4
|
-
* This module provides unified snapshot testing across multiple test frameworks
|
|
5
|
-
* including node:test, Jest, Vitest, Mocha, and custom test runners.
|
|
6
|
-
*
|
|
7
|
-
* **Quick Start:**
|
|
8
|
-
*
|
|
9
|
-
* ```typescript
|
|
10
|
-
* import test from 'node:test';
|
|
11
|
-
* import { expect } from 'bupkis';
|
|
12
|
-
*
|
|
13
|
-
* test('component renders correctly', (t) => {
|
|
14
|
-
* const output = renderComponent();
|
|
15
|
-
* expect(output, 'to match snapshot', t);
|
|
16
|
-
* });
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* **Key Features:**
|
|
20
|
-
*
|
|
21
|
-
* - Unified API across all frameworks
|
|
22
|
-
* - Automatic framework detection
|
|
23
|
-
* - Custom serialization support
|
|
24
|
-
* - Multiple snapshots per test
|
|
25
|
-
* - Chainable with other assertions
|
|
26
|
-
*
|
|
27
|
-
* @packageDocumentation
|
|
28
|
-
* @see {@link snapshotAssertion} for the main snapshot assertion
|
|
29
|
-
* @see {@link SnapshotAdapter} for custom adapter implementation
|
|
30
|
-
* @see {@link defaultSerializer} for serialization utilities
|
|
31
|
-
*/
|
|
32
|
-
export { snapshotAssertion, SnapshotAssertions, type SnapshotAssertions as SnapshotAssertionsType, } from "../assertion/impl/snapshot.js";
|
|
33
|
-
export type { SnapshotAdapter, SnapshotContext, SnapshotOptions, SnapshotSerializer, } from "./adapter.js";
|
|
34
|
-
export { isTestContext } from "./adapter.js";
|
|
35
|
-
export { fallbackAdapter, type FallbackAdapter } from "./adapters/fallback.js";
|
|
36
|
-
export { nodeTestAdapter, type NodeTestAdapter } from "./adapters/node-test.js";
|
|
37
|
-
export { assertNodeVersion, getNodeMajorVersion, MIN_NODE_MAJOR_VERSION, supportsNodeTestSnapshots, } from "./node-version.js";
|
|
38
|
-
export { getRegisteredAdapters, registerAdapter, selectAdapter, } from "./select-adapter.js";
|
|
39
|
-
export { defaultSerializer, nodeTestCompatibleSerializer, type SerializerOptions, } from "./serializer.js";
|
|
40
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/snapshot/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,kBAAkB,IAAI,sBAAsB,GAClD,sCAAsC;AAGvC,YAAY,EACV,eAAe,EACf,eAAe,EACf,eAAe,EACf,kBAAkB,GACnB,qBAAqB;AAEtB,OAAO,EAAE,aAAa,EAAE,qBAAqB;AAG7C,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,+BAA+B;AAE/E,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,gCAAgC;AAGhF,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,GAC1B,0BAA0B;AAG3B,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,aAAa,GACd,4BAA4B;AAG7B,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAC5B,KAAK,iBAAiB,GACvB,wBAAwB"}
|
package/dist/snapshot/index.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Snapshot testing utilities for BUPKIS.
|
|
3
|
-
*
|
|
4
|
-
* This module provides unified snapshot testing across multiple test frameworks
|
|
5
|
-
* including node:test, Jest, Vitest, Mocha, and custom test runners.
|
|
6
|
-
*
|
|
7
|
-
* **Quick Start:**
|
|
8
|
-
*
|
|
9
|
-
* ```typescript
|
|
10
|
-
* import test from 'node:test';
|
|
11
|
-
* import { expect } from 'bupkis';
|
|
12
|
-
*
|
|
13
|
-
* test('component renders correctly', (t) => {
|
|
14
|
-
* const output = renderComponent();
|
|
15
|
-
* expect(output, 'to match snapshot', t);
|
|
16
|
-
* });
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* **Key Features:**
|
|
20
|
-
*
|
|
21
|
-
* - Unified API across all frameworks
|
|
22
|
-
* - Automatic framework detection
|
|
23
|
-
* - Custom serialization support
|
|
24
|
-
* - Multiple snapshots per test
|
|
25
|
-
* - Chainable with other assertions
|
|
26
|
-
*
|
|
27
|
-
* @packageDocumentation
|
|
28
|
-
* @see {@link snapshotAssertion} for the main snapshot assertion
|
|
29
|
-
* @see {@link SnapshotAdapter} for custom adapter implementation
|
|
30
|
-
* @see {@link defaultSerializer} for serialization utilities
|
|
31
|
-
*/
|
|
32
|
-
// Snapshot assertion (re-export from assertion module for convenience)
|
|
33
|
-
export { snapshotAssertion, SnapshotAssertions, } from "../assertion/impl/snapshot.js";
|
|
34
|
-
export { isTestContext } from "./adapter.js";
|
|
35
|
-
// Built-in adapters
|
|
36
|
-
export { fallbackAdapter } from "./adapters/fallback.js";
|
|
37
|
-
export { nodeTestAdapter } from "./adapters/node-test.js";
|
|
38
|
-
// Node.js version utilities
|
|
39
|
-
export { assertNodeVersion, getNodeMajorVersion, MIN_NODE_MAJOR_VERSION, supportsNodeTestSnapshots, } from "./node-version.js";
|
|
40
|
-
// Adapter selection
|
|
41
|
-
export { getRegisteredAdapters, registerAdapter, selectAdapter, } from "./select-adapter.js";
|
|
42
|
-
// Serialization
|
|
43
|
-
export { defaultSerializer, nodeTestCompatibleSerializer, } from "./serializer.js";
|
|
44
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/snapshot/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,uEAAuE;AACvE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,GAEnB,sCAAsC;AAUvC,OAAO,EAAE,aAAa,EAAE,qBAAqB;AAE7C,oBAAoB;AACpB,OAAO,EAAE,eAAe,EAAwB,+BAA+B;AAE/E,OAAO,EAAE,eAAe,EAAwB,gCAAgC;AAEhF,4BAA4B;AAC5B,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,GAC1B,0BAA0B;AAE3B,oBAAoB;AACpB,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,aAAa,GACd,4BAA4B;AAE7B,gBAAgB;AAChB,OAAO,EACL,iBAAiB,EACjB,4BAA4B,GAE7B,wBAAwB"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Node.js version utilities for snapshot testing.
|
|
4
|
-
*
|
|
5
|
-
* @packageDocumentation
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.assertNodeVersion = exports.supportsNodeTestSnapshots = exports.getNodeMajorVersion = exports.MIN_NODE_MAJOR_VERSION = void 0;
|
|
9
|
-
/**
|
|
10
|
-
* Minimum Node.js major version required for snapshot testing with node:test.
|
|
11
|
-
*
|
|
12
|
-
* Node.js v22 is the first version with stable `assert.snapshot()` support in
|
|
13
|
-
* the native test runner.
|
|
14
|
-
*/
|
|
15
|
-
exports.MIN_NODE_MAJOR_VERSION = 22;
|
|
16
|
-
/**
|
|
17
|
-
* Get the current Node.js major version.
|
|
18
|
-
*
|
|
19
|
-
* @function
|
|
20
|
-
* @returns Major version number (e.g., 20, 22, 24)
|
|
21
|
-
*/
|
|
22
|
-
const getNodeMajorVersion = () => {
|
|
23
|
-
const parts = process.versions.node.split('.');
|
|
24
|
-
return Number(parts[0]) || 0;
|
|
25
|
-
};
|
|
26
|
-
exports.getNodeMajorVersion = getNodeMajorVersion;
|
|
27
|
-
/**
|
|
28
|
-
* Check if the current Node.js version supports snapshot testing with
|
|
29
|
-
* node:test.
|
|
30
|
-
*
|
|
31
|
-
* @returns `true` if Node.js version >= {@link MIN_NODE_MAJOR_VERSION}
|
|
32
|
-
*/
|
|
33
|
-
exports.supportsNodeTestSnapshots = (0, exports.getNodeMajorVersion)() >= exports.MIN_NODE_MAJOR_VERSION;
|
|
34
|
-
/**
|
|
35
|
-
* Assert that the Node.js version supports snapshot testing.
|
|
36
|
-
*
|
|
37
|
-
* @function
|
|
38
|
-
* @throws {Error} If Node.js version is less than {@link MIN_NODE_MAJOR_VERSION}
|
|
39
|
-
*/
|
|
40
|
-
const assertNodeVersion = () => {
|
|
41
|
-
const major = (0, exports.getNodeMajorVersion)();
|
|
42
|
-
if (major < exports.MIN_NODE_MAJOR_VERSION) {
|
|
43
|
-
throw new Error(`Snapshot testing with node:test requires Node.js v${exports.MIN_NODE_MAJOR_VERSION} or later. ` +
|
|
44
|
-
`Current version: v${process.versions.node}. ` +
|
|
45
|
-
`Please upgrade Node.js or use a different snapshot adapter (e.g., pass an explicit snapshot name string instead of a test context).`);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
exports.assertNodeVersion = assertNodeVersion;
|
|
49
|
-
//# sourceMappingURL=node-version.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-version.js","sourceRoot":"","sources":["../../src/snapshot/node-version.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;;GAKG;AACU,QAAA,sBAAsB,GAAG,EAAE,CAAC;AAEzC;;;;;GAKG;AACI,MAAM,mBAAmB,GAAG,GAAW,EAAE;IAC9C,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/C,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC,CAAC;AAHW,QAAA,mBAAmB,uBAG9B;AAEF;;;;;GAKG;AACU,QAAA,yBAAyB,GACpC,IAAA,2BAAmB,GAAE,IAAI,8BAAsB,CAAC;AAElD;;;;;GAKG;AACI,MAAM,iBAAiB,GAAG,GAAS,EAAE;IAC1C,MAAM,KAAK,GAAG,IAAA,2BAAmB,GAAE,CAAC;IACpC,IAAI,KAAK,GAAG,8BAAsB,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CACb,qDAAqD,8BAAsB,aAAa;YACtF,qBAAqB,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI;YAC9C,qIAAqI,CACxI,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AATW,QAAA,iBAAiB,qBAS5B"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Node.js version utilities for snapshot testing.
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Minimum Node.js major version required for snapshot testing with node:test.
|
|
8
|
-
*
|
|
9
|
-
* Node.js v22 is the first version with stable `assert.snapshot()` support in
|
|
10
|
-
* the native test runner.
|
|
11
|
-
*/
|
|
12
|
-
export declare const MIN_NODE_MAJOR_VERSION = 22;
|
|
13
|
-
/**
|
|
14
|
-
* Get the current Node.js major version.
|
|
15
|
-
*
|
|
16
|
-
* @function
|
|
17
|
-
* @returns Major version number (e.g., 20, 22, 24)
|
|
18
|
-
*/
|
|
19
|
-
export declare const getNodeMajorVersion: () => number;
|
|
20
|
-
/**
|
|
21
|
-
* Check if the current Node.js version supports snapshot testing with
|
|
22
|
-
* node:test.
|
|
23
|
-
*
|
|
24
|
-
* @returns `true` if Node.js version >= {@link MIN_NODE_MAJOR_VERSION}
|
|
25
|
-
*/
|
|
26
|
-
export declare const supportsNodeTestSnapshots: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Assert that the Node.js version supports snapshot testing.
|
|
29
|
-
*
|
|
30
|
-
* @function
|
|
31
|
-
* @throws {Error} If Node.js version is less than {@link MIN_NODE_MAJOR_VERSION}
|
|
32
|
-
*/
|
|
33
|
-
export declare const assertNodeVersion: () => void;
|
|
34
|
-
//# sourceMappingURL=node-version.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-version.d.ts","sourceRoot":"","sources":["../../src/snapshot/node-version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,QAAO,MAGtC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,SACW,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,QAAO,IASpC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Node.js version utilities for snapshot testing.
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Minimum Node.js major version required for snapshot testing with node:test.
|
|
8
|
-
*
|
|
9
|
-
* Node.js v22 is the first version with stable `assert.snapshot()` support in
|
|
10
|
-
* the native test runner.
|
|
11
|
-
*/
|
|
12
|
-
export declare const MIN_NODE_MAJOR_VERSION = 22;
|
|
13
|
-
/**
|
|
14
|
-
* Get the current Node.js major version.
|
|
15
|
-
*
|
|
16
|
-
* @function
|
|
17
|
-
* @returns Major version number (e.g., 20, 22, 24)
|
|
18
|
-
*/
|
|
19
|
-
export declare const getNodeMajorVersion: () => number;
|
|
20
|
-
/**
|
|
21
|
-
* Check if the current Node.js version supports snapshot testing with
|
|
22
|
-
* node:test.
|
|
23
|
-
*
|
|
24
|
-
* @returns `true` if Node.js version >= {@link MIN_NODE_MAJOR_VERSION}
|
|
25
|
-
*/
|
|
26
|
-
export declare const supportsNodeTestSnapshots: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Assert that the Node.js version supports snapshot testing.
|
|
29
|
-
*
|
|
30
|
-
* @function
|
|
31
|
-
* @throws {Error} If Node.js version is less than {@link MIN_NODE_MAJOR_VERSION}
|
|
32
|
-
*/
|
|
33
|
-
export declare const assertNodeVersion: () => void;
|
|
34
|
-
//# sourceMappingURL=node-version.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-version.d.ts","sourceRoot":"","sources":["../../src/snapshot/node-version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,QAAO,MAGtC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,SACW,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,QAAO,IASpC,CAAC"}
|