MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / testMotion

Function testMotion

lib/web/CodeMirror/test/vim_test.js:312–321  ·  view source on GitHub ↗

* @param name Name of the test * @param keys An array of keys or a string with a single key to simulate. * @param endPos The expected end position of the cursor. * @param startPos The position the cursor should start at, defaults to 0, 0.

(name, keys, endPos, startPos)

Source from the content-addressed store, hash-verified

310 * @param startPos The position the cursor should start at, defaults to 0, 0.
311 */
312function testMotion(name, keys, endPos, startPos) {
313 testVim(name, function(cm, vim, helpers) {
314 if (!startPos) {
315 startPos = new Pos(0, 0);
316 }
317 cm.setCursor(startPos);
318 helpers.doKeys(keys);
319 helpers.assertCursorAt(endPos);
320 });
321}
322
323function testMotionWithFolding(name, keys, endPos, startPos) {
324 testVim(name, function (cm, vim, helpers) {

Callers 1

vim_test.jsFile · 0.85

Calls 1

testVimFunction · 0.85

Tested by

no test coverage detected