@rotorsoft/act-tck 2.1.0 → 2.1.1
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/dist/.tsbuildinfo +1 -1
- package/dist/@types/store-tck.d.ts.map +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -17
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-tck.d.ts","sourceRoot":"","sources":["../../src/store-tck.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAUV,KAAK,EAIN,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"store-tck.d.ts","sourceRoot":"","sources":["../../src/store-tck.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAUV,KAAK,EAIN,MAAM,sBAAsB,CAAC;AAuB9B;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;;;OASG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC;;;;;;;;;OASG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;;;OAQG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC;;;;;;;OAOG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,gCAAgC,CAAC,EAAE,OAAO,CAAC;IACpD;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACxD;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,WAAW,YAAa,eAAe,KAAG,IA62MtD,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -5445,7 +5445,7 @@ var runStoreTck = (options) => {
|
|
|
5445
5445
|
(0, import_vitest9.expect)(next.id).toBeGreaterThan(head);
|
|
5446
5446
|
});
|
|
5447
5447
|
});
|
|
5448
|
-
beforeEach(async () => {
|
|
5448
|
+
(0, import_vitest9.beforeEach)(async () => {
|
|
5449
5449
|
await store.drop();
|
|
5450
5450
|
await store.seed();
|
|
5451
5451
|
});
|
|
@@ -5744,22 +5744,18 @@ var runStoreTck = (options) => {
|
|
|
5744
5744
|
(0, import_vitest9.expect)(back[1].meta.causation.event?.id).toBe(back[0].id);
|
|
5745
5745
|
(0, import_vitest9.expect)(back[2].meta.causation.event?.id).toBe(back[1].id);
|
|
5746
5746
|
});
|
|
5747
|
-
(0, import_vitest9.it)("
|
|
5747
|
+
(0, import_vitest9.it)("gives a cause missing from the source id -1, so it names no restored event", async () => {
|
|
5748
5748
|
const s = `restore-orphan-${uid()}`;
|
|
5749
5749
|
const t = /* @__PURE__ */ new Date("2020-09-01T00:00:00.000Z");
|
|
5750
5750
|
await restore(
|
|
5751
5751
|
as_source([
|
|
5752
|
+
event(5, s, 0, "Incremented", t, { amount: 1 }),
|
|
5752
5753
|
{
|
|
5753
|
-
|
|
5754
|
-
stream: s,
|
|
5755
|
-
version: 0,
|
|
5756
|
-
name: "Incremented",
|
|
5757
|
-
data: { amount: 1 },
|
|
5758
|
-
created: t,
|
|
5754
|
+
...event(6, s, 1, "Incremented", t, { amount: 1 }),
|
|
5759
5755
|
meta: {
|
|
5760
5756
|
correlation: "c",
|
|
5761
5757
|
causation: {
|
|
5762
|
-
event: { id:
|
|
5758
|
+
event: { id: 1, name: "Pruned", stream: "ghost" }
|
|
5763
5759
|
}
|
|
5764
5760
|
}
|
|
5765
5761
|
}
|
|
@@ -5772,7 +5768,11 @@ var runStoreTck = (options) => {
|
|
|
5772
5768
|
},
|
|
5773
5769
|
{ stream: s, stream_exact: true }
|
|
5774
5770
|
);
|
|
5775
|
-
(0, import_vitest9.expect)(back[
|
|
5771
|
+
(0, import_vitest9.expect)(back[1].meta.causation.event).toEqual({
|
|
5772
|
+
id: -1,
|
|
5773
|
+
name: "Pruned",
|
|
5774
|
+
stream: "ghost"
|
|
5775
|
+
});
|
|
5776
5776
|
});
|
|
5777
5777
|
(0, import_vitest9.it)("rolls back atomically when the source throws mid-iteration", async () => {
|
|
5778
5778
|
const original = `restore-pre-${uid()}`;
|