Skip to content

Commit

Permalink
fixup logic - fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Kipras Melnikovas <[email protected]>
  • Loading branch information
kiprasmel committed Apr 3, 2023
1 parent c34f56b commit a31814c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions test/apply.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import Git from "nodegit";
import { configKeys } from "../config";
import { gitStackedRebase } from "../git-stacked-rebase";
import { humanOpChangeCommandOfNthCommitInto } from "../humanOp";
import { editor__internal, noEditor } from "../internal";
import { askQuestion__internal, editor__internal, noEditor } from "../internal";

import { setupRepo } from "./util/setupRepo";
import { question, Questions } from "../util/createQuestion";

export async function applyTC() {
await integration__git_stacked_rebase_exits_if_apply_was_needed_but_user_disallowed();
Expand Down Expand Up @@ -50,9 +51,13 @@ async function integration__git_stacked_rebase_exits_if_apply_was_needed_but_use
gitStackedRebase(initialBranch, {
...common,
...noEditor,
/**
* TODO: allow handling question prompts, and respond with `n` to disallow.
*/
[askQuestion__internal]: (q, ...rest) => {
if (q === Questions.need_to_apply_before_continuing) {
return "n";
}

return question(q, ...rest);
},
})
);

Expand Down

0 comments on commit a31814c

Please sign in to comment.