Add test for quit command
All checks were successful
timw4mail/scroll/pipeline/head This commit looks good
All checks were successful
timw4mail/scroll/pipeline/head This commit looks good
This commit is contained in:
parent
cf80dce335
commit
76eacd835f
@ -415,8 +415,17 @@ const EditorTest = {
|
|||||||
assertTrue(res);
|
assertTrue(res);
|
||||||
},
|
},
|
||||||
'.processKeyPress - ctrl-q': async () => {
|
'.processKeyPress - ctrl-q': async () => {
|
||||||
|
// Dirty file (Need to clear confirmation messages)
|
||||||
const e = new Editor(defaultTerminalSize);
|
const e = new Editor(defaultTerminalSize);
|
||||||
const res = await e.processKeyPress(Fn.ctrlKey('q'));
|
await e.processKeyPress('d');
|
||||||
|
assertTrue(await e.processKeyPress(Fn.ctrlKey('q')));
|
||||||
|
assertTrue(await e.processKeyPress(Fn.ctrlKey('q')));
|
||||||
|
assertTrue(await e.processKeyPress(Fn.ctrlKey('q')));
|
||||||
|
assertFalse(await e.processKeyPress(Fn.ctrlKey('q')));
|
||||||
|
|
||||||
|
// Clean file
|
||||||
|
const e2 = new Editor(defaultTerminalSize);
|
||||||
|
const res = await e2.processKeyPress(Fn.ctrlKey('q'));
|
||||||
assertFalse(res);
|
assertFalse(res);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user