3422794932
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
29 lines
775 B
TypeScript
29 lines
775 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { workflowMoveOptionsPayload } from "./workflow-move-options";
|
|
|
|
describe("workflowMoveOptionsPayload", () => {
|
|
it("trims values and omits empty overrides", () => {
|
|
expect(
|
|
workflowMoveOptionsPayload({
|
|
resetContext: true,
|
|
instructions: " create the PR ready for review ",
|
|
skipStepPrompt: true,
|
|
}),
|
|
).toEqual({
|
|
reset_context: true,
|
|
instructions: "create the PR ready for review",
|
|
skip_step_prompt: true,
|
|
});
|
|
});
|
|
|
|
it("returns undefined for a destination-only move", () => {
|
|
expect(
|
|
workflowMoveOptionsPayload({
|
|
resetContext: false,
|
|
instructions: "",
|
|
skipStepPrompt: false,
|
|
}),
|
|
).toBeUndefined();
|
|
});
|
|
});
|