MCPcopy
hub / github.com/VSCodeVim/Vim / setupTestWithLines

Function setupTestWithLines

test/completion/lineCompletion.test.ts:20–28  ·  view source on GitHub ↗
(lines: string[])

Source from the content-addressed store, hash-verified

18 });
19
20 const setupTestWithLines = async (lines: string[]) => {
21 vimState.cursorStopPosition = new Position(0, 0);
22
23 await modeHandler.handleKeyEvent('<Esc>');
24 await vimState.editor.edit((builder) => {
25 builder.insert(new Position(0, 0), lines.join('\n'));
26 });
27 await modeHandler.handleMultipleKeyEvents(['<Esc>', 'g', 'g', 'j', 'j', 'A']);
28 };
29
30 suite('Line Completion Provider unit tests', () => {
31 // TODO(#4844): this fails on Windows

Callers 1

Calls 5

editMethod · 0.80
joinMethod · 0.80
handleKeyEventMethod · 0.65
insertMethod · 0.45

Tested by

no test coverage detected