renaming variable and a little refactoring

This commit is contained in:
2026-05-25 20:03:36 -06:00
parent 558f2a0ea9
commit 858bf67043
7 changed files with 121 additions and 85 deletions
+4 -4
View File
@@ -20,7 +20,7 @@ import {
import {
apply,
decide,
makeAwaitingSnapshotSelection,
makeAwaitingTrustedBundle,
validatePreviousRunManifest,
workflow,
} from "../src/contexts/ingest-snapshot/index.js"
@@ -51,7 +51,7 @@ describe("ingestSnapshot workflow", () => {
it("hard-stops when the bundle location is not parseable", () => {
const result = decide(
makeAwaitingSnapshotSelection(),
makeAwaitingTrustedBundle(),
makeCommand({
BundleInput: makeTaintedBundleInput(makeTaintedBundleLocation("not-a-path")),
}),
@@ -64,10 +64,10 @@ describe("ingestSnapshot workflow", () => {
})
it("applies the ingested event into SnapshotIngested state", () => {
const result = decide(makeAwaitingSnapshotSelection(), makeCommand())
const result = decide(makeAwaitingTrustedBundle(), makeCommand())
expect(Either.isRight(result)).toBe(true)
if (Either.isRight(result)) {
const nextState = apply(makeAwaitingSnapshotSelection(), result.right)
const nextState = apply(makeAwaitingTrustedBundle(), result.right)
expect(nextState._tag).toBe("SnapshotIngested")
if (nextState._tag === "SnapshotIngested") {
expect(nextState.RunManifest.CanonicalProjectionPath).toBe(