Skip to content

Commit b28e5f2

Browse files
committed
Fix projection test timestamp construction
1 parent 599c1aa commit b28e5f2

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

apps/server/src/orchestration/Layers/ProjectionPipeline.test.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
} from "@t3tools/contracts";
1212
import * as NodeServices from "@effect/platform-node/NodeServices";
1313
import { assert, it } from "@effect/vitest";
14+
import * as DateTime from "effect/DateTime";
1415
import * as Effect from "effect/Effect";
1516
import * as FileSystem from "effect/FileSystem";
1617
import * as Layer from "effect/Layer";
@@ -612,9 +613,9 @@ it.layer(
612613
const projectionPipeline = yield* OrchestrationProjectionPipeline;
613614
const eventStore = yield* OrchestrationEventStore;
614615
const sql = yield* SqlClient.SqlClient;
615-
const first = new Date("2026-02-24T00:00:01.000Z").toISOString();
616-
const second = new Date("2026-02-24T00:00:02.000Z").toISOString();
617-
const third = new Date("2026-02-24T00:00:03.000Z").toISOString();
616+
const first = DateTime.formatIso(DateTime.makeUnsafe("2026-02-24T00:00:01.000Z"));
617+
const second = DateTime.formatIso(DateTime.makeUnsafe("2026-02-24T00:00:02.000Z"));
618+
const third = DateTime.formatIso(DateTime.makeUnsafe("2026-02-24T00:00:03.000Z"));
618619

619620
const appendAndProject = (event: Parameters<typeof eventStore.append>[0]) =>
620621
eventStore
@@ -730,9 +731,9 @@ it.layer(
730731
const projectionPipeline = yield* OrchestrationProjectionPipeline;
731732
const snapshotQuery = yield* ProjectionSnapshotQuery;
732733
const eventStore = yield* OrchestrationEventStore;
733-
const first = new Date("2026-02-24T00:00:01.000Z").toISOString();
734-
const second = new Date("2026-02-24T00:00:02.000Z").toISOString();
735-
const third = new Date("2026-02-24T00:00:03.000Z").toISOString();
734+
const first = DateTime.formatIso(DateTime.makeUnsafe("2026-02-24T00:00:01.000Z"));
735+
const second = DateTime.formatIso(DateTime.makeUnsafe("2026-02-24T00:00:02.000Z"));
736+
const third = DateTime.formatIso(DateTime.makeUnsafe("2026-02-24T00:00:03.000Z"));
736737

737738
const appendAndProject = (event: Parameters<typeof eventStore.append>[0]) =>
738739
eventStore

0 commit comments

Comments
 (0)