@rotorsoft/act-tck 1.41.3 → 1.41.4
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 +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -2
- 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":"
|
|
1
|
+
{"version":3,"file":"store-tck.d.ts","sourceRoot":"","sources":["../../src/store-tck.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAUV,KAAK,EAIN,MAAM,sBAAsB,CAAC;AAe9B;;;;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,IAk0LtD,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1155,7 +1155,6 @@ var runStoreTck = (options) => {
|
|
|
1155
1155
|
(0, import_vitest9.describe)(`TCK / Store / ${options.name}`, () => {
|
|
1156
1156
|
let store;
|
|
1157
1157
|
const caps = { ...options.capabilities };
|
|
1158
|
-
const is_literal = (source) => !/[\]^$.*+?()[{}|\\]/.test(source);
|
|
1159
1158
|
const correlate = async (target = store) => {
|
|
1160
1159
|
const rows = [];
|
|
1161
1160
|
await target.query_streams(
|
|
@@ -1175,7 +1174,10 @@ var runStoreTck = (options) => {
|
|
|
1175
1174
|
(e) => {
|
|
1176
1175
|
mark = Math.max(mark, e.id);
|
|
1177
1176
|
},
|
|
1178
|
-
row.source !== void 0 ? {
|
|
1177
|
+
row.source !== void 0 ? {
|
|
1178
|
+
stream: row.source,
|
|
1179
|
+
stream_exact: (0, import_act2.is_literal_source)(row.source, row.stream)
|
|
1180
|
+
} : {}
|
|
1179
1181
|
);
|
|
1180
1182
|
if (mark > row.at)
|
|
1181
1183
|
marks.push({
|
|
@@ -1929,6 +1931,16 @@ var runStoreTck = (options) => {
|
|
|
1929
1931
|
const leases = await store.claim(5, 5, `w-${uid()}`, 5e3);
|
|
1930
1932
|
(0, import_vitest9.expect)(leases.filter((l) => l.stream === s)).toHaveLength(0);
|
|
1931
1933
|
});
|
|
1934
|
+
(0, import_vitest9.it)("takes a target reading itself, whatever its name holds", async () => {
|
|
1935
|
+
const name = `self-a+b(${uid()}`;
|
|
1936
|
+
await store.subscribe([{ stream: name, source: name }]);
|
|
1937
|
+
const found = [];
|
|
1938
|
+
await store.query_streams((p) => found.push(p.stream), {
|
|
1939
|
+
stream: name,
|
|
1940
|
+
stream_exact: true
|
|
1941
|
+
});
|
|
1942
|
+
(0, import_vitest9.expect)(found).toEqual([name]);
|
|
1943
|
+
});
|
|
1932
1944
|
(0, import_vitest9.it)("claims a fresh subscription as soon as its first event is marked", async () => {
|
|
1933
1945
|
const s = `fresh-first-${uid()}`;
|
|
1934
1946
|
const src = `fresh-first-src-${uid()}`;
|