fix(tui): restore prompt from undo autocomplete
This commit is contained in:
parent
cdb8fc9960
commit
4bd1ecb232
3 changed files with 7 additions and 6 deletions
|
|
@ -43,6 +43,10 @@ describe("reverted prompt", () => {
|
|||
})
|
||||
})
|
||||
|
||||
test.each(["/", "/u", "/un", "/und", "/undo", " /undo "])("replaces the undo autocomplete query %p", (input) => {
|
||||
expect(revertedPrompt({ input, parts: [] }, message)?.input).toBe("Fix the tests")
|
||||
})
|
||||
|
||||
test("preserves an existing text draft", () => {
|
||||
expect(revertedPrompt({ input: "Keep this", parts: [] }, message)).toBeUndefined()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue