@rotorsoft/act-tck 1.36.4 → 1.36.6

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
@@ -4761,7 +4761,7 @@ var runStoreTck = (options) => {
4761
4761
  expect8(seen[0].pii).toEqual({ email: "u@example.com", name: "Ursula" });
4762
4762
  expect8(seen[0].data).toEqual({ amount: 1 });
4763
4763
  });
4764
- it7("revives a Date in pii like data/meta (#1365/#1370)", async () => {
4764
+ it7("round-trips a Date losslessly in pii, like data/meta (#1365/#1370/#1556)", async () => {
4765
4765
  const s = `pii-date-${uid()}`;
4766
4766
  const when = /* @__PURE__ */ new Date("2024-03-01T10:20:30.000Z");
4767
4767
  await store.commit(
@@ -4785,9 +4785,10 @@ var runStoreTck = (options) => {
4785
4785
  expect8(seen).toHaveLength(1);
4786
4786
  const at = seen[0].data.at;
4787
4787
  const born = seen[0].pii.born;
4788
- expect8(at).toBeInstanceOf(Date);
4789
- expect8(born).toBeInstanceOf(Date);
4790
- expect8(born.toISOString()).toBe(when.toISOString());
4788
+ const recovered = (v) => v instanceof Date ? v.getTime() : new Date(v).getTime();
4789
+ expect8(recovered(at)).toBe(when.getTime());
4790
+ expect8(recovered(born)).toBe(when.getTime());
4791
+ expect8(typeof at).toBe(typeof born);
4791
4792
  });
4792
4793
  it7("query_stats head/tail never carry pii \u2014 introspection surface is pii-safe (#1294)", async () => {
4793
4794
  const s = `pii-stats-${uid()}`;