@rotorsoft/act-tck 1.41.0 → 1.41.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/dist/.tsbuildinfo +1 -1
- package/dist/@types/store-tck.d.ts.map +1 -1
- package/dist/index.cjs +13 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1236,6 +1236,19 @@ var runStoreTck = (options) => {
|
|
|
1236
1236
|
store.commit(s, [inc(1)], make_meta({ stream: s }), 0)
|
|
1237
1237
|
).rejects.toBeInstanceOf(ConcurrencyError);
|
|
1238
1238
|
});
|
|
1239
|
+
it7("treats expectedVersion -1 as an empty stream", async () => {
|
|
1240
|
+
const s = `commit-new-cc-${uid()}`;
|
|
1241
|
+
const [first] = await store.commit(
|
|
1242
|
+
s,
|
|
1243
|
+
[inc(1)],
|
|
1244
|
+
make_meta({ stream: s }),
|
|
1245
|
+
-1
|
|
1246
|
+
);
|
|
1247
|
+
expect8(first.version).toBe(0);
|
|
1248
|
+
await expect8(
|
|
1249
|
+
store.commit(s, [inc(1)], make_meta({ stream: s }), -1)
|
|
1250
|
+
).rejects.toBeInstanceOf(ConcurrencyError);
|
|
1251
|
+
});
|
|
1239
1252
|
it7("checks expectedVersion even when committing no events", async () => {
|
|
1240
1253
|
const s = `commit-empty-cc-${uid()}`;
|
|
1241
1254
|
await store.commit(
|