@rotorsoft/act-tck 1.27.31 → 1.27.33

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/index.js CHANGED
@@ -3141,6 +3141,30 @@ var runStoreTck = (options) => {
3141
3141
  });
3142
3142
  });
3143
3143
  describe8("query_streams", () => {
3144
+ it7("keyset pagination visits every stream regardless of name case (#1375)", async () => {
3145
+ const tag = uid();
3146
+ const names = [
3147
+ `${tag}-Bravo`,
3148
+ `${tag}-alpha`,
3149
+ `${tag}-Charlie`,
3150
+ `${tag}-delta`
3151
+ ];
3152
+ await store.subscribe(names.map((stream) => ({ stream })));
3153
+ const visited = [];
3154
+ let after;
3155
+ for (; ; ) {
3156
+ const page = [];
3157
+ await store.query_streams((p) => page.push(p.stream), {
3158
+ stream: `${tag}-.*`,
3159
+ after,
3160
+ limit: 1
3161
+ });
3162
+ if (page.length === 0) break;
3163
+ visited.push(...page);
3164
+ after = page.at(-1);
3165
+ }
3166
+ expect8([...visited].sort()).toEqual([...names].sort());
3167
+ });
3144
3168
  it7("returns positions filtered by stream regex, exact, source, and source_exact", async () => {
3145
3169
  const tag = uid();
3146
3170
  const proj1 = `qs-${tag}-projection-tickets`;
@@ -4215,24 +4239,33 @@ var runStoreTck = (options) => {
4215
4239
  expect8(seen[0].pii).toEqual({ email: "u@example.com", name: "Ursula" });
4216
4240
  expect8(seen[0].data).toEqual({ amount: 1 });
4217
4241
  });
4218
- it7("revives a Date in a pii field to a Date, like data (#1365)", async () => {
4242
+ it7("revives a Date in pii like data/meta (#1365/#1370)", async () => {
4219
4243
  const s = `pii-date-${uid()}`;
4220
- const dob = /* @__PURE__ */ new Date("2000-03-04T05:06:07.000Z");
4244
+ const when = /* @__PURE__ */ new Date("2024-03-01T10:20:30.000Z");
4221
4245
  await store.commit(
4222
4246
  s,
4223
- [{ name: "Incremented", data: { amount: 1 }, pii: { dob } }],
4247
+ [
4248
+ {
4249
+ name: "Incremented",
4250
+ data: { amount: 1, at: when },
4251
+ pii: { born: when }
4252
+ }
4253
+ ],
4224
4254
  make_meta({ stream: s })
4225
4255
  );
4226
4256
  const seen = [];
4227
- await store.query((e) => seen.push(e), {
4228
- stream: s,
4229
- stream_exact: true
4230
- });
4231
- expect8(seen).toHaveLength(1);
4232
- expect8(seen[0].pii.dob).toBeInstanceOf(Date);
4233
- expect8(seen[0].pii.dob.getTime()).toBe(
4234
- dob.getTime()
4257
+ await store.query(
4258
+ (e) => {
4259
+ seen.push(e);
4260
+ },
4261
+ { stream: s, stream_exact: true }
4235
4262
  );
4263
+ expect8(seen).toHaveLength(1);
4264
+ const at = seen[0].data.at;
4265
+ const born = seen[0].pii.born;
4266
+ expect8(at).toBeInstanceOf(Date);
4267
+ expect8(born).toBeInstanceOf(Date);
4268
+ expect8(born.toISOString()).toBe(when.toISOString());
4236
4269
  });
4237
4270
  it7("query_stats head/tail never carry pii \u2014 introspection surface is pii-safe (#1294)", async () => {
4238
4271
  const s = `pii-stats-${uid()}`;