Skip to content

Commit af1b9bd

Browse files
committed
test(app): tighten create settings assertions
1 parent 1c24d74 commit af1b9bd

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/app/tests/docker-git/app-ready-create-fixture.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { expect, vi } from "vitest"
33

44
import {
55
type CreateFlowView,
6+
type DisplayModeFlowView,
67
createInitialFlowView,
78
resolveCreateDisplaySteps
89
} from "../../src/docker-git/menu-create-shared.js"
@@ -150,7 +151,7 @@ export const createKeyEvent = (
150151
}
151152

152153
/** @pure true @effect none @invariant mode is display and repo values are committed @precondition n/a @postcondition settings tests start after the repo step @complexity O(1) */
153-
export const createSettingsFlowView = (): CreateFlowView => ({
154+
export const createSettingsFlowView = (): DisplayModeFlowView => ({
154155
mode: "display",
155156
step: 1,
156157
buffer: "30%",
@@ -166,7 +167,7 @@ export const createSettingsFlowView = (): CreateFlowView => ({
166167
export const createSettingsFlowViewAtStep = (
167168
stepName: CreateStep,
168169
buffer = "draft"
169-
): CreateFlowView => ({
170+
): DisplayModeFlowView => ({
170171
...createSettingsFlowView(),
171172
buffer,
172173
step: resolveRequiredCreateStepIndex(stepName, resolveCreateDisplaySteps())

packages/app/tests/docker-git/app-ready-create.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ describe("app-ready-create", () => {
6767

6868
expect(submitCreateInputsMock).not.toHaveBeenCalled()
6969
expect(requireCreateViewValue(setCreateViewSpy.mock.calls[0]?.[0])).toMatchObject({
70+
mode: "display",
7071
step: 1,
7172
values: {
7273
outDir: "/home/dev/.docker-git/org/repo",

0 commit comments

Comments
 (0)