function testMotion(name, keys, endPos, startPos) {
  testVim(name, function(cm, vim, helpers) {
    if (!startPos) {
      startPos = { line: 0, ch: 0 };
    }
    cm.setCursor(startPos);
    helpers.doKeys(keys);
    helpers.assertCursorAt(endPos);
  });
}
@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.