@rotorsoft/act-tck 1.27.32 → 1.27.34

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
@@ -4239,24 +4239,33 @@ var runStoreTck = (options) => {
4239
4239
  expect8(seen[0].pii).toEqual({ email: "u@example.com", name: "Ursula" });
4240
4240
  expect8(seen[0].data).toEqual({ amount: 1 });
4241
4241
  });
4242
- 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 () => {
4243
4243
  const s = `pii-date-${uid()}`;
4244
- const dob = /* @__PURE__ */ new Date("2000-03-04T05:06:07.000Z");
4244
+ const when = /* @__PURE__ */ new Date("2024-03-01T10:20:30.000Z");
4245
4245
  await store.commit(
4246
4246
  s,
4247
- [{ name: "Incremented", data: { amount: 1 }, pii: { dob } }],
4247
+ [
4248
+ {
4249
+ name: "Incremented",
4250
+ data: { amount: 1, at: when },
4251
+ pii: { born: when }
4252
+ }
4253
+ ],
4248
4254
  make_meta({ stream: s })
4249
4255
  );
4250
4256
  const seen = [];
4251
- await store.query((e) => seen.push(e), {
4252
- stream: s,
4253
- stream_exact: true
4254
- });
4255
- expect8(seen).toHaveLength(1);
4256
- expect8(seen[0].pii.dob).toBeInstanceOf(Date);
4257
- expect8(seen[0].pii.dob.getTime()).toBe(
4258
- dob.getTime()
4257
+ await store.query(
4258
+ (e) => {
4259
+ seen.push(e);
4260
+ },
4261
+ { stream: s, stream_exact: true }
4259
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());
4260
4269
  });
4261
4270
  it7("query_stats head/tail never carry pii \u2014 introspection surface is pii-safe (#1294)", async () => {
4262
4271
  const s = `pii-stats-${uid()}`;