@kairos-es/testing 1.0.0-alpha.3 → 1.0.0-alpha.5

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/README.md CHANGED
@@ -8,12 +8,9 @@ A **development** dependency: it peers `@effect/vitest` and is imported from
8
8
  tests only.
9
9
 
10
10
  ```sh
11
- pnpm add -D @kairos-es/testing@alpha @effect/vitest@^0.30.0 vitest@^3.2.4
11
+ pnpm add -D @kairos-es/testing@alpha @effect/vitest@^4.0.5 vitest@^5.0.4
12
12
  ```
13
13
 
14
- `vitest` is named because `@effect/vitest` requires it and pnpm does not install
15
- a peer for you.
16
-
17
14
  Its other peers, `@kairos-es/core`, `@kairos-es/codec` and `effect`, are the ones
18
15
  an application using the library already has.
19
16
 
@@ -51,8 +51,11 @@ var _effect = require("effect");
51
51
  * `then` compares the *appended* events (those written past the given seed) to
52
52
  * the expected batch structurally — by `type`, `tags`, and `data` — ignoring
53
53
  * the store-assigned `position` and the producer-supplied `uuid`/`occurredAt`,
54
- * which are not part of the decision under test. JSON serialisation is
55
- * deterministic, so equal payloads produce equal `data` bytes.
54
+ * which are not part of the decision under test. `metadata` is excluded for the
55
+ * same reason: it is the circumstances of the recording (a trace id, a
56
+ * correlation id), never what the decision asserted, so a Given/When/Then spec
57
+ * asserting on it would be asserting on plumbing (ADR-0017). JSON serialisation
58
+ * is deterministic, so equal payloads produce equal `data` bytes.
56
59
  */
57
60
 
58
61
  const shapeOf = event => ({
@@ -61,7 +64,7 @@ const shapeOf = event => ({
61
64
  data: event.data
62
65
  });
63
66
  /** Collect a stream of sequenced events into a plain array. */
64
- const collect = events => _effect.Stream.runCollect(events).pipe(_effect.Effect.map(_effect.Chunk.toReadonlyArray));
67
+ const collect = events => _effect.Stream.runCollect(events);
65
68
  /**
66
69
  * Seed the given past-event producers into the store: materialise each producer
67
70
  * (encode -> serialise), then one append each (log order). Returns the position
@@ -147,7 +150,7 @@ const specificationForCycle = run => ({
147
150
  const exit = yield* runToExit;
148
151
  (0, _vitest.expect)(_effect.Exit.isFailure(exit)).toBe(true);
149
152
  if (_effect.Exit.isFailure(exit)) {
150
- const failure = _effect.Cause.failureOption(exit.cause);
153
+ const failure = _effect.Cause.findErrorOption(exit.cause);
151
154
  const error = failure._tag === 'Some' ? failure.value : undefined;
152
155
  const actualTag = typeof error === 'object' && error !== null && '_tag' in error ? error._tag : undefined;
153
156
  (0, _vitest.expect)(actualTag).toBe(tag);
@@ -1 +1 @@
1
- {"version":3,"file":"specification.js","names":["_vitest","require","_codec","_core","_effect","shapeOf","event","type","tags","data","collect","events","Stream","runCollect","pipe","Effect","map","Chunk","toReadonlyArray","seed","producers","gen","store","DcbEventStore","last","ORIGIN","producer","append","orDie","appendedAfter","after","read","Q","all","specificationForCycle","run","given","pastEvents","when","command","runToExit","zip","exit","then","expected","Exit","isFailure","failCause","cause","seedBoundary","result","value","expect","isUnchanged","toBe","appended","expectedEvents","s","toEqual","thenError","tag","failure","Cause","failureOption","error","_tag","undefined","actualTag","thenUnchanged","exports","specificationFor","decider","runDecider","scenario","description","build","it","effect","provide","Layer","mergeAll","fresh","DcbEventStoreInMemory","SerializerDefault","UuidTest"],"sources":["../../src/specification.ts"],"sourcesContent":[null],"mappings":";;;;;;AA8CA,IAAAA,OAAA,GAAAC,OAAA;AAWA,IAAAC,MAAA,GAAAD,OAAA;AAQA,IAAAE,KAAA,GAAAF,OAAA;AAUA,IAAAG,OAAA,GAAAH,OAAA;AA3EA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,MAAMI,OAAO,GAAIC,KAAe,KAAkB;EAChDC,IAAI,EAAED,KAAK,CAACC,IAAI;EAChBC,IAAI,EAAEF,KAAK,CAACE,IAAI;EAChBC,IAAI,EAAEH,KAAK,CAACG;CACb,CAAC;AAEF;AACA,MAAMC,OAAO,GACXC,MAAqC,IAErCC,cAAM,CAACC,UAAU,CAACF,MAAM,CAAC,CAACG,IAAI,CAAC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AAC+D,OAAO,CACZC,aAAK,CAACC,QAAQ,CACZD,aAAK,CAACE,KAAK,CAACC,2BAAqB,CAAC,EAClCC,wBAAiB,EACjBJ,aAAK,CAACE,KAAK,CAACG,eAAQ,CAAC,CACtB,CACF,CACF,CACF;AACH,CAAC;AAAAf,OAAA,CAAAI,QAAA,GAAAA,QAAA","ignoreList":[]}
1
+ {"version":3,"file":"specification.js","names":["_vitest","require","_codec","_core","_effect","shapeOf","event","type","tags","data","collect","events","Stream","runCollect","seed","producers","Effect","gen","store","DcbEventStore","last","ORIGIN","producer","append","pipe","orDie","appendedAfter","after","read","Q","all","specificationForCycle","run","given","pastEvents","when","command","runToExit","zip","exit","then","expected","Exit","isFailure","failCause","cause","seedBoundary","result","value","expect","isUnchanged","toBe","appended","expectedEvents","map","s","toEqual","thenError","tag","failure","Cause","findErrorOption","error","_tag","undefined","actualTag","thenUnchanged","exports","specificationFor","decider","runDecider","scenario","description","build","it","effect","provide","Layer","mergeAll","fresh","DcbEventStoreInMemory","SerializerDefault","UuidTest"],"sources":["../../src/specification.ts"],"sourcesContent":[null],"mappings":";;;;;;AAiDA,IAAAA,OAAA,GAAAC,OAAA;AAWA,IAAAC,MAAA,GAAAD,OAAA;AAQA,IAAAE,KAAA,GAAAF,OAAA;AAUA,IAAAG,OAAA,GAAAH,OAAA;AA9EA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,MAAMI,OAAO,GAAIC,KAAe,KAAkB;EAChDC,IAAI,EAAED,KAAK,CAACC,IAAI;EAChBC,IAAI,EAAEF,KAAK,CAACE,IAAI;EAChBC,IAAI,EAAEH,KAAK,CAACG;CACb,CAAC;AAEF;AACA,MAAMC,OAAO,GACXC,MAAqC,IACYC,cAAM,CAACC,UAAU,CAACF,MAAM,CAAC;AAE5E;;;;;;;;;;;AAWA,MAAMG,IAAI,GACRC,SAA0C,IAE1CC,cAAM,CAACC,GAAG,CAAC,aAAS;EAClB,MAAMC,K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AAC;AAAAf,OAAA,CAAAI,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"specification.d.ts","sourceRoot":"","sources":["../../src/specification.ts"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,SAAS,EACV,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAGL,KAAK,UAAU,EAEf,KAAK,IAAI,EAEV,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,QAAQ,EACb,aAAa,EAGb,KAAK,QAAQ,EAGd,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,KAAK,KAAK,IAAI,GAAG,EAAS,MAAM,EAAuB,MAAM,QAAQ,CAAA;AAE9E,mFAAmF;AACnF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAC1C,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,IAAI,GAAG,CAAC,CACtB,CAAA;AAiED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,qBAAqB,GACrB,oBAAoB,GACpB,eAAe,CAAA;AAEnB;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,aAAa,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;IAC9C;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,CACd,GAAG,UAAU,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KAC3C,SAAS,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1C,o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AACH,eAAO,MAAM,gBAAgB,GAC3B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EACzC,OAAO,EACP,CAAC,EACD,CAAC,EACD,CAAC,SAAS,cAAc,GAAG,GAAG,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAE9D,SAAS,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KACpC,aAAa,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAG7C,CAAA;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,GACnB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EACzC,OAAO,EACP,CAAC,EACD,CAAC,SAAS,cAAc,GAAG,GAAG,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAE9D,aAAa,MAAM,EACnB,SAAS,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,EACzC,OAAO,CACL,IAAI,EAAE,aAAa,CAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,KACrD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,UAAU,EAAE,aAAa,GAAG,UAAU,GAAG,IAAI,CAAC,KAC1E,IAcF,CAAA"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @kairos-es/testing — the Given/When/Then decision-model testing surface.
3
+ *
4
+ * A `DeciderSpecification`-equivalent over a real fold and a `DcbEventStore` (in
5
+ * practice the in-memory layer): `@kairos-es/codec`'s `buildDecisionModel` for
6
+ * a single-hop decision, and `modelAtHead` plus the read ledger for a layered
7
+ * one. Shaped so an Event Modeling `Specification` (given events / when a
8
+ * command / then events / thenError a tag) compiles onto it 1:1, plus
9
+ * `thenUnchanged` for a decision that answers "already done" and appends
10
+ * nothing.
11
+ *
12
+ * scenario('subscribe a student', subscribeDecider, (spec) =>
13
+ * spec
14
+ * .given(courseDefined('c1', 10))
15
+ * .when({ studentId: 's1', courseId: 'c1' })
16
+ * .then(studentSubscribed('s1', 'c1')),
17
+ * )
18
+ *
19
+ * The unit it exercises — `Decider`, pairing the schema-backed projections a
20
+ * command reads with an effectful `decide` step producing events via `toEvent`,
21
+ * and `runDecider`, running the real read -> decode -> decide -> append cycle —
22
+ * belongs to `@kairos-es/codec` and is imported from there, so the surface
23
+ * exercises the genuine production cycle and not a test-only restatement of it.
24
+ * It is deliberately NOT re-exported here: this package peers `@effect/vitest`,
25
+ * and a re-export would let a production command handler reach a test framework
26
+ * through the type it names. Given/expected events are effectful producers
27
+ * (`toEvent`), materialised under the same serialiser + uuid layers `scenario`
28
+ * provides.
29
+ */
30
+ export * from './specification.js';
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,141 @@
1
+ import type { CodecError, Decider, DecisionOutput, NoReadsRecorded, RequirementOf, SliceProjection, TaglessSliceInLedger, Unchanged } from '@kairos-es/codec';
2
+ import { type Serializer, type Uuid } from '@kairos-es/codec';
3
+ import { type AppendConditionFailed, type DcbEvent, DcbEventStore, type Position } from '@kairos-es/core';
4
+ import { type Array as Arr, Effect } from 'effect';
5
+ /** An effectful producer of a wire event (the `toEvent` result an app authors). */
6
+ export type EventProducer<R> = Effect.Effect<DcbEvent, CodecError, Serializer | Uuid | R>;
7
+ /**
8
+ * The errors a command CYCLE contributes, beyond whatever `E` the decision
9
+ * itself fails with.
10
+ *
11
+ * Named once and exported because it is what makes the layered entry point below
12
+ * UNIFY. `WhenSpec.then` adds this union itself, so a `run` written as a naive
13
+ * `Effect<Position, E, R>` double-counts every member of it and fails to
14
+ * typecheck against a chain that has already added them — a trap with an
15
+ * unhelpful error message, met once and closed here by giving the union a name a
16
+ * caller can write.
17
+ *
18
+ * `NoReadsRecorded` is reachable only on the layered path and `TaglessSliceInLedger`
19
+ * only where a bracket is open, but both are members here rather than in a second
20
+ * union, because the two paths share every step downstream of `when` and a second
21
+ * union would be a second thing to keep in step for no caller's benefit.
22
+ */
23
+ export type CycleError = CodecError | AppendConditionFailed | TaglessSliceInLedger | NoReadsRecorded;
24
+ /**
25
+ * The entry point of the Given/When/Then chain: what `specificationFor` returns
26
+ * and what `scenario` hands its `build` callback. It is NAMED rather than
27
+ * written inline at those two sites because it was the one step of this chain
28
+ * with no name — the two statements of it were free to drift — and it is the
29
+ * step a caller most needs to name, since factoring a `build` callback out of a
30
+ * `scenario` call means writing its parameter's type. The sibling fluent
31
+ * builder in `@kairos-es/codec` names its own entry point (`ProjectionBuilder`)
32
+ * for the same reason.
33
+ *
34
+ * It introduces no type parameter of its own: all four are `GivenSpec`'s below,
35
+ * passed straight through, because seeding past events changes nothing about
36
+ * the command, the domain error, or either requirement — it only fixes the
37
+ * state the decision is folded from.
38
+ */
39
+ export interface Specification<Command, E, R, PR> {
40
+ /**
41
+ * Seed the past events, in log order (one append each). They are effectful
42
+ * producers, materialised under the same layers the decision runs against.
43
+ */
44
+ readonly given: (...pastEvents: ReadonlyArray<EventProducer<R>>) => GivenSpec<Command, E, R, PR>;
45
+ }
46
+ /**
47
+ * A spec bound to a decider and a set of given events, awaiting `.when`. `PR` is
48
+ * the slices' decode requirement (`RequirementOf<P>`) that also flows through
49
+ * the terminals' requirement channel alongside the produce requirement `R`.
50
+ */
51
+ export interface GivenSpec<Command, E, R, PR> {
52
+ /** Supply the command to decide. */
53
+ readonly when: (command: Command) => WhenSpec<E, R, PR>;
54
+ }
55
+ /** A spec that has a command and awaits a `then`/`thenError`/`thenUnchanged` assertion. */
56
+ export interface WhenSpec<E, R, PR> {
57
+ /**
58
+ * Assert the success branch: the decider appended exactly these events
59
+ * (compared structurally by type/tags/data, in order). The expected events are
60
+ * effectful producers, materialised under the provided layers. The error
61
+ * channel keeps `E | CycleError` because a genuinely failing cycle re-raises
62
+ * its cause (a `.then` on a failing decision is a test-authoring mistake, made
63
+ * loud rather than silently green).
64
+ *
65
+ * A cycle that answered `Unchanged` FAILS this assertion, even with no
66
+ * expected events. `.then()` with an empty list and `.thenUnchanged()` both
67
+ * see nothing appended, but they claim different things — *decided an empty
68
+ * change* is not a decision this library can make, while *already done* is —
69
+ * so the one that does not match the cycle's answer must not pass.
70
+ */
71
+ readonly then: (...expected: ReadonlyArray<EventProducer<R>>) => Effect.Effect<void, E | CycleError, DcbEventStore | Serializer | Uuid | R | PR>;
72
+ /**
73
+ * Assert the failure branch: the cycle failed with a tagged error whose
74
+ * `_tag` equals `tag` (a domain error from `decide`, a `CodecError` from
75
+ * decode, or `AppendConditionFailed` from a moved consistency boundary).
76
+ *
77
+ * ⚠ THREE WAYS THIS PASSES FOR THE WRONG REASON, and a layered or permission
78
+ * suite must assert more than the tag. An opaque refusal is correct on the wire
79
+ * and is exactly what blinds this assertion — two different denials share one
80
+ * tag, so a spec can pass on a refusal its author did not mean. An
81
+ * `AppendConditionFailed` now also fires for an EARLIER hop, so the tag no
82
+ * longer says which boundary moved. And `NoReadsRecorded` is a reachable spec
83
+ * whose shape does not mark it as structural: it reads like a domain assertion
84
+ * and is a statement about wiring.
85
+ */
86
+ readonly thenError: (tag: string) => Effect.Effect<void, never, DcbEventStore | Serializer | Uuid | R | PR>;
87
+ /**
88
+ * Assert the "already done" branch: the cycle SUCCEEDED with `Unchanged`
89
+ * (recognised by `isUnchanged`, never by its tag) and appended nothing past
90
+ * the seed. A cycle that appended — even an empty-looking one — or that
91
+ * returned a `Position` fails it, and a failing cycle re-raises its cause, for
92
+ * the reason `then` gives.
93
+ *
94
+ * Both halves are asserted, not just the result, because they are different
95
+ * claims: a runner that returned `Unchanged` AND appended would be exactly the
96
+ * defect this step exists to catch, and the result alone would not see it.
97
+ */
98
+ readonly thenUnchanged: () => Effect.Effect<void, E | CycleError, DcbEventStore | Serializer | Uuid | R | PR>;
99
+ }
100
+ /**
101
+ * Begin a specification for ANY command cycle that returns the appended
102
+ * `Position` — a bracket for one command as readily as a decider — or
103
+ * `Unchanged`, for a cycle that can answer "already done".
104
+ *
105
+ * This is the general form and `specificationFor` below is a one-line
106
+ * specialisation of it, which is the result worth stating rather than the
107
+ * mechanism: a `Decider` is one particular `(command) => Effect<Position, …>`,
108
+ * and `runDecider` is the function that says so. Nothing downstream of `when`
109
+ * moves — the same seed boundary, the same read-back, the same shape comparison
110
+ * — because both cycles already agree on what they return.
111
+ *
112
+ * ⚠ `run`'s error channel is written `E | CycleError` and must be: the chain adds
113
+ * that union itself, so a naive `Effect<Position, E, R>` double-counts it and
114
+ * fails to unify. `CycleError` exists to be written here.
115
+ */
116
+ export declare const specificationForCycle: <Command, E, R, PR = never>(run: (command: Command) => Effect.Effect<Position | Unchanged, E | CycleError, DcbEventStore | Serializer | Uuid | R | PR>) => Specification<Command, E, R, PR>;
117
+ /**
118
+ * Begin a specification for `decider`. The returned `given(...)` starts the
119
+ * Given/When/Then chain; the terminal step yields an `Effect` requiring
120
+ * `DcbEventStore | Serializer | Uuid | R | RequirementOf<P>`.
121
+ *
122
+ * One line over the layered sibling above, and deliberately not a twin of it:
123
+ * a duplicated body would be two sets of tests and two things free to drift on
124
+ * the seed boundary, the read-back or the shape comparison.
125
+ */
126
+ export declare const specificationFor: <P extends Record<string, SliceProjection>, Command, E, R, O extends DecisionOutput = Arr.NonEmptyReadonlyArray<DcbEvent>>(decider: Decider<P, Command, E, R, O>) => Specification<Command, E, R, RequirementOf<P>>;
127
+ /**
128
+ * `scenario(description, spec => spec.given(...).when(...).then(...))` — register
129
+ * an `@effect/vitest` `it.effect` case running `build` against a fresh in-memory
130
+ * `DcbEventStore` plus the default serialiser and a fresh deterministic uuid
131
+ * layer. The callback receives `specificationFor(decider)` so example suites
132
+ * read as a single Given/When/Then line per case.
133
+ *
134
+ * `scenario` provides exactly the store, serialiser, and uuid, so `build` must
135
+ * return an effect requiring only those three. For a plain decider (`R` and
136
+ * `RequirementOf<P>` both `never`) that is automatic; a decider carrying an
137
+ * encryption requirement provides its cipher layer inside `build` before
138
+ * returning.
139
+ */
140
+ export declare const scenario: <P extends Record<string, SliceProjection>, Command, E, O extends DecisionOutput = Arr.NonEmptyReadonlyArray<DcbEvent>>(description: string, decider: Decider<P, Command, E, never, O>, build: (spec: Specification<Command, E, never, RequirementOf<P>>) => Effect.Effect<void, E | CycleError, DcbEventStore | Serializer | Uuid>) => void;
141
+ //# sourceMappingURL=specification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"specification.d.ts","sourceRoot":"","sources":["../../src/specification.ts"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,SAAS,EACV,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAGL,KAAK,UAAU,EAEf,KAAK,IAAI,EAEV,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,QAAQ,EACb,aAAa,EAGb,KAAK,QAAQ,EAGd,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,KAAK,KAAK,IAAI,GAAG,EAAS,MAAM,EAAuB,MAAM,QAAQ,CAAA;AAE9E,mFAAmF;AACnF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAC1C,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,IAAI,GAAG,CAAC,CACtB,CAAA;AAiED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,qBAAqB,GACrB,oBAAoB,GACpB,eAAe,CAAA;AAEnB;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,aAAa,C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,23 @@
41
41
  * `then` compares the *appended* events (those written past the given seed) to
42
42
  * the expected batch structurally — by `type`, `tags`, and `data` — ignoring
43
43
  * the store-assigned `position` and the producer-supplied `uuid`/`occurredAt`,
44
- * which are not part of the decision under test. JSON serialisation is
45
- * deterministic, so equal payloads produce equal `data` bytes.
44
+ * which are not part of the decision under test. `metadata` is excluded for the
45
+ * same reason: it is the circumstances of the recording (a trace id, a
46
+ * correlation id), never what the decision asserted, so a Given/When/Then spec
47
+ * asserting on it would be asserting on plumbing (ADR-0017). JSON serialisation
48
+ * is deterministic, so equal payloads produce equal `data` bytes.
46
49
  */
47
50
  import { expect, it } from '@effect/vitest';
48
51
  import { isUnchanged, runDecider, SerializerDefault, UuidTest } from '@kairos-es/codec';
49
52
  import { DcbEventStore, DcbEventStoreInMemory, ORIGIN, query as Q } from '@kairos-es/core';
50
- import { Cause, Chunk, Effect, Exit, Layer, Stream } from 'effect';
53
+ import { Cause, Effect, Exit, Layer, Stream } from 'effect';
51
54
  const shapeOf = event => ({
52
55
  type: event.type,
53
56
  tags: event.tags,
54
57
  data: event.data
55
58
  });
56
59
  /** Collect a stream of sequenced events into a plain array. */
57
- const collect = events => Stream.runCollect(events).pipe(Effect.map(Chunk.toReadonlyArray));
60
+ const collect = events => Stream.runCollect(events);
58
61
  /**
59
62
  * Seed the given past-event producers into the store: materialise each producer
60
63
  * (encode -> serialise), then one append each (log order). Returns the position
@@ -140,7 +143,7 @@ export const specificationForCycle = run => ({
140
143
  const exit = yield* runToExit;
141
144
  expect(Exit.isFailure(exit)).toBe(true);
142
145
  if (Exit.isFailure(exit)) {
143
- const failure = Cause.failureOption(exit.cause);
146
+ const failure = Cause.findErrorOption(exit.cause);
144
147
  const error = failure._tag === 'Some' ? failure.value : undefined;
145
148
  const actualTag = typeof error === 'object' && error !== null && '_tag' in error ? error._tag : undefined;
146
149
  expect(actualTag).toBe(tag);
@@ -1 +1 @@
1
- {"version":3,"file":"specification.js","names":["expect","it","isUnchanged","runDecider","SerializerDefault","UuidTest","DcbEventStore","DcbEventStoreInMemory","ORIGIN","query","Q","Cause","Chunk","Effect","Exit","Layer","Stream","shapeOf","event","type","tags","data","collect","events","runCollect","pipe","map","toReadonlyArray","seed","producers","gen","store","last","producer","append","orDie","appendedAfter","after","read","all","specificationForCycle","run","given","pastEvents","when","command","runToExit","zip","exit","then","expected","isFailure","failCause","cause","seedBoundary","result","value","toBe","appended","expectedEvents","s","toEqual","thenError","tag","failure","failureOption","error","_tag","undefined","actualTag","thenUnchanged","specificationFor","decider","scenario","description","build","effect","provide","mergeAll","fresh"],"sources":["../../src/specification.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,SAASA,MAAM,EAAEC,EAAE,QAAQ,gBAAgB;AAW3C,SACEC,WAAW,EACXC,UAAU,EAEVC,iBAAiB,EAEjBC,QAAQ,QACH,kBAAkB;AACzB,SAGEC,aAAa,EACbC,qBAAqB,EACrBC,MAAM,EAENC,KAAK,IAAIC,CAAC,QAEL,iBAAiB;AACxB,SAEEC,KAAK,EACLC,KAAK,EACLC,MAAM,EACNC,IAAI,EACJC,KAAK,EACLC,MAAM,QACD,QAAQ;AAgBf,MAAMC,OAAO,GAAIC,KAAe,KAAkB;EAChDC,IAAI,EAAED,KAAK,CAACC,IAAI;EAChBC,IAAI,EAAEF,KAAK,CAACE,IAAI;EAChBC,IAAI,EAAEH,KAAK,CAACG;CACb,CAAC;AAEF;AACA,MAAMC,OAAO,GACXC,MAAqC,IAErCP,MAAM,CAACQ,UAAU,CAACD,MAAM,CAAC,CAACE,IAAI,CAACZ,MAAM,CAACa,GAAG,CAACd,KAAK,CAACe,eAAe,CAAC,CAAC;AAEnE;;;;;;;;;;;AAWA,MAAMC,IAAI,GACRC,SAA0C,IAE1ChB,MAAM,CAACiB,GAAG,CAAC,aAAS;EAClB,MAAMC,KAAK,GAAG,OAAOzB,aAAa;EAClC,IAAI0B,IAAI,GA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AAG,OAAOF,SAAS;UAC7B,IAAIhC,IAAI,CAACqC,SAAS,CAACH,IAAI,CAAC,EAAE;YACxB,OAAO,OAAOnC,MAAM,CAACuC,SAAS,CAACJ,IAAI,CAACK,KAAK,CAAC;UAC5C;UACA,MAAM,CAACC,YAAY,EAAEC,MAAM,CAAC,GAAGP,IAAI,CAACQ,KAAK;UACzCxD,MAAM,CAACE,WAAW,CAACqD,MAAM,CAAC,CAAC,CAACE,IAAI,CAAC,IAAI,CAAC;UACtC,MAAMC,QAAQ,GAAG,OAAOtB,aAAa,CAACkB,YAAY,CAAC;UACnDtD,MAAM,CAAC0D,QAAQ,CAAChC,GAAG,CAAEkC,CAAC,IAAK3C,OAAO,CAAC2C,CAAC,CAAC1C,KAAK,CAAC,CAAC,CAAC,CAAC2C,OAAO,CAAC,EAAE,CAAC;QAC3D,CAAC;OACJ;IACH;GACD;CACF,CAAC;AAEF;;;;;;;;;AASA,OAAO,MAAMU,gBAAgB,GAO3BC,OAAqC,IAErChC,qBAAqB,CAAmCK,OAAO,IAC7D1C,UAAU,CAACqE,OAAO,EAAE3B,OAAO,CAAC,CAC7B;AAEH;;;;;;;;;;;;;AAaA,OAAO,MAAM4B,QAAQ,GAAGA,CAMtBC,WAAmB,EACnBF,OAAyC,EACzCG,KAE2E,KACnE;EACR1E,EAAE,CAAC2E,MAAM,CAACF,WAAW,EAAE,MACrBC,KAAK,CAACJ,gBAAgB,CAACC,OAAO,CAAC,CAAC,CAAC/C,IAAI;EACnC;EACA;EACAZ,MAAM,CAACgE,OAAO,CACZ9D,KAAK,CAAC+D,QAAQ,CACZ/D,KAAK,CAACgE,KAAK,CAACxE,qBAAqB,CAAC,EAClCH,iBAAiB,EACjBW,KAAK,CAACgE,KAAK,CAAC1E,QAAQ,CAAC,CACtB,CACF,CACF,CACF;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"specification.js","names":["expect","it","isUnchanged","runDecider","SerializerDefault","UuidTest","DcbEventStore","DcbEventStoreInMemory","ORIGIN","query","Q","Cause","Effect","Exit","Layer","Stream","shapeOf","event","type","tags","data","collect","events","runCollect","seed","producers","gen","store","last","producer","append","pipe","orDie","appendedAfter","after","read","all","specificationForCycle","run","given","pastEvents","when","command","runToExit","zip","exit","then","expected","isFailure","failCause","cause","seedBoundary","result","value","toBe","appended","expectedEvents","map","s","toEqual","thenError","tag","failure","findErrorOption","error","_tag","undefined","actualTag","thenUnchanged","specificationFor","decider","scenario","description","build","effect","provide","mergeAll","fresh"],"sources":["../../src/specification.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,SAASA,MAAM,EAAEC,EAAE,QAAQ,gBAAgB;AAW3C,SACEC,WAAW,EACXC,UAAU,EAEVC,iBAAiB,EAEjBC,QAAQ,QACH,kBAAkB;AACzB,SAGEC,aAAa,EACbC,qBAAqB,EACrBC,MAAM,EAENC,KAAK,IAAIC,CAAC,QAEL,iBAAiB;AACxB,SAA4BC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,MAAM,QAAQ,QAAQ;AAmB9E,MAAMC,OAAO,GAAIC,KAAe,KAAkB;EAChDC,IAAI,EAAED,KAAK,CAACC,IAAI;EAChBC,IAAI,EAAEF,KAAK,CAACE,IAAI;EAChBC,IAAI,EAAEH,KAAK,CAACG;CACb,CAAC;AAEF;AACA,MAAMC,OAAO,GACXC,MAAqC,IACYP,MAAM,CAACQ,UAAU,CAACD,MAAM,CAAC;AAE5E;;;;;;;;;;;AAWA,MAAME,IAAI,GACRC,SAA0C,IAE1Cb,MAAM,CAACc,GAAG,CAAC,aAAS;EAClB,MAAMC,KAAK,GAAG,OAAOrB,aAAa;EAClC,IAAIsB,IAAI,GAAapB,MAAM;EAC3B,KAAK,MAAMqB,QAAQ,IAAIJ,SAAS,EAAE;IAChC,MAAMR,KAAK,GAAG,OAAOY,QAAQ;IAC7B;IACA;IACAD,IAAI,GAAG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;UAC5C;UACA,MAAM,CAACC,YAAY,EAAEC,MAAM,CAAC,GAAGP,IAAI,CAACQ,KAAK;UACzCrD,MAAM,CAACE,WAAW,CAACkD,MAAM,CAAC,CAAC,CAACE,IAAI,CAAC,IAAI,CAAC;UACtC,MAAMC,QAAQ,GAAG,OAAOtB,aAAa,CAACkB,YAAY,CAAC;UACnDnD,MAAM,CAACuD,QAAQ,CAACE,GAAG,CAAEC,CAAC,IAAK1C,OAAO,CAAC0C,CAAC,CAACzC,KAAK,CAAC,CAAC,CAAC,CAAC0C,OAAO,CAAC,EAAE,CAAC;QAC3D,CAAC;OACJ;IACH;GACD;CACF,CAAC;AAEF;;;;;;;;;AASA,OAAO,MAAMU,gBAAgB,GAO3BC,OAAqC,IAErCjC,qBAAqB,CAAmCK,OAAO,IAC7DvC,UAAU,CAACmE,OAAO,EAAE5B,OAAO,CAAC,CAC7B;AAEH;;;;;;;;;;;;;AAaA,OAAO,MAAM6B,QAAQ,GAAGA,CAMtBC,WAAmB,EACnBF,OAAyC,EACzCG,KAE2E,KACnE;EACRxE,EAAE,CAACyE,MAAM,CAACF,WAAW,EAAE,MACrBC,KAAK,CAACJ,gBAAgB,CAACC,OAAO,CAAC,CAAC,CAACvC,IAAI;EACnC;EACA;EACAnB,MAAM,CAAC+D,OAAO,CACZ7D,KAAK,CAAC8D,QAAQ,CACZ9D,KAAK,CAAC+D,KAAK,CAACtE,qBAAqB,CAAC,EAClCH,iBAAiB,EACjBU,KAAK,CAAC+D,KAAK,CAACxE,QAAQ,CAAC,CACtB,CACF,CACF,CACF;AACH,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kairos-es/testing",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.5",
4
4
  "description": "Given/When/Then decision-model testing surface for kairos-es",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": {
@@ -11,19 +11,24 @@
11
11
  "sideEffects": [],
12
12
  "homepage": "https://github.com/neverbland/kairos-es",
13
13
  "peerDependencies": {
14
- "@effect/vitest": "^0.30.0",
15
- "effect": "^3.22.0",
16
- "@kairos-es/codec": "^1.0.0-alpha.3",
17
- "@kairos-es/core": "^1.0.0-alpha.3"
14
+ "@effect/vitest": "^4.0.5",
15
+ "effect": "^4.0.5",
16
+ "@kairos-es/codec": "^1.0.0-alpha.5",
17
+ "@kairos-es/core": "^1.0.0-alpha.5"
18
18
  },
19
19
  "main": "./dist/cjs/index.js",
20
20
  "module": "./dist/esm/index.js",
21
- "types": "./dist/dts/index.d.ts",
21
+ "types": "./dist/dts-cjs/index.d.ts",
22
22
  "exports": {
23
23
  ".": {
24
- "types": "./dist/dts/index.d.ts",
25
- "import": "./dist/esm/index.js",
26
- "default": "./dist/cjs/index.js"
24
+ "import": {
25
+ "types": "./dist/dts-esm/index.d.ts",
26
+ "default": "./dist/esm/index.js"
27
+ },
28
+ "require": {
29
+ "types": "./dist/dts-cjs/index.d.ts",
30
+ "default": "./dist/cjs/index.js"
31
+ }
27
32
  },
28
33
  "./package.json": "./package.json"
29
34
  },
@@ -41,8 +41,11 @@
41
41
  * `then` compares the *appended* events (those written past the given seed) to
42
42
  * the expected batch structurally — by `type`, `tags`, and `data` — ignoring
43
43
  * the store-assigned `position` and the producer-supplied `uuid`/`occurredAt`,
44
- * which are not part of the decision under test. JSON serialisation is
45
- * deterministic, so equal payloads produce equal `data` bytes.
44
+ * which are not part of the decision under test. `metadata` is excluded for the
45
+ * same reason: it is the circumstances of the recording (a trace id, a
46
+ * correlation id), never what the decision asserted, so a Given/When/Then spec
47
+ * asserting on it would be asserting on plumbing (ADR-0017). JSON serialisation
48
+ * is deterministic, so equal payloads produce equal `data` bytes.
46
49
  */
47
50
  import { expect, it } from '@effect/vitest'
48
51
  import type {
@@ -73,15 +76,7 @@ import {
73
76
  query as Q,
74
77
  type SequencedEvent,
75
78
  } from '@kairos-es/core'
76
- import {
77
- type Array as Arr,
78
- Cause,
79
- Chunk,
80
- Effect,
81
- Exit,
82
- Layer,
83
- Stream,
84
- } from 'effect'
79
+ import { type Array as Arr, Cause, Effect, Exit, Layer, Stream } from 'effect'
85
80
 
86
81
  /** An effectful producer of a wire event (the `toEvent` result an app authors). */
87
82
  export type EventProducer<R> = Effect.Effect<
@@ -90,7 +85,10 @@ export type EventProducer<R> = Effect.Effect<
90
85
  Serializer | Uuid | R
91
86
  >
92
87
 
93
- /** The structural shape `then` compares on (position/uuid/occurredAt excluded). */
88
+ /**
89
+ * The structural shape `then` compares on (position/uuid/occurredAt/metadata
90
+ * excluded — none is part of the decision under test).
91
+ */
94
92
  interface EventShape {
95
93
  readonly type: string
96
94
  readonly tags: ReadonlyArray<string>
@@ -106,8 +104,7 @@ const shapeOf = (event: DcbEvent): EventShape => ({
106
104
  /** Collect a stream of sequenced events into a plain array. */
107
105
  const collect = (
108
106
  events: Stream.Stream<SequencedEvent>,
109
- ): Effect.Effect<ReadonlyArray<SequencedEvent>> =>
110
- Stream.runCollect(events).pipe(Effect.map(Chunk.toReadonlyArray))
107
+ ): Effect.Effect<ReadonlyArray<SequencedEvent>> => Stream.runCollect(events)
111
108
 
112
109
  /**
113
110
  * Seed the given past-event producers into the store: materialise each producer
@@ -329,7 +326,7 @@ export const specificationForCycle = <Command, E, R, PR = never>(
329
326
  const exit = yield* runToExit
330
327
  expect(Exit.isFailure(exit)).toBe(true)
331
328
  if (Exit.isFailure(exit)) {
332
- const failure = Cause.failureOption(exit.cause)
329
+ const failure = Cause.findErrorOption(exit.cause)
333
330
  const error = failure._tag === 'Some' ? failure.value : undefined
334
331
  const actualTag =
335
332
  typeof error === 'object' && error !== null && '_tag' in error
@@ -1 +0,0 @@
1
- {"version":3,"file":"specification.d.ts","sourceRoot":"","sources":["../../src/specification.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,SAAS,EACV,MAAM,kBAA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