renaming variable and a little refactoring
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user