<commit_before>import { Mode } from '../../../src/mode/mode';
import { getTestingFunctions } from '../../testSimplifier';
import { cleanUpWorkspace, setupWorkspace } from '../../testUtils';

suite('Mode Normal', () => {
  const { newTest, newTestOnly, newTestSkip } = getTestingFunctions();

  setup(async () => {
    await setupWorkspace();
  });

  teardown(cleanUpWorkspace);

  newTest({
    title: "Can handle 'x'",
    start: ['te|xt'],
    keysPressed: 'x',
    end: ['te|t'],
  });

  newTest({
    title: "Can handle 'Nx'",
    start: ['te|xt'],
    keysPressed: '2x',
    end: ['t|e'],
  });

  newTest({
    title: "Can handle 'Nx' and paste",
    start: ['t|ext'],
    keysPressed: '2xo<Esc>p',
    end: ['tt', 'e|x'],
  });

  newTest({
    title: "Can handle 'x' at end of line",
    start: ['one tw|o'],
    keysPressed: '^llxxxxxxxxx',
    end: ['|'],
  });

  newTestOnly({
    title: "'x' with count does not go over EOL",
    start: ['one t|wo', 'three four'],
    keysPressed: '1000x',
    end: ['one |t', 'three four'],
  });

  newTest({
    title: "Can handle 'Ns'",
    start: ['|text'],
    keysPressed: '3s',
    end: ['|t'],
    endMode: Mode.Insert,
  });

  newTest({
    title: "Can handle 'Ns' at end of line",
    start: ['te|xt'],
    keysPressed: '3s',<commit_msg>Remove `newTestOnly`<commit_after>import { Mode } from '../../../src/mode/mode';
import { getTestingFunctions } from '../../testSimplifier';
import { cleanUpWorkspace, setupWorkspace } from '../../testUtils';

suite('Mode Normal', () => {
  const { newTest, newTestOnly, newTestSkip } = getTestingFunctions();

  setup(async () => {
    await setupWorkspace();
  });

  teardown(cleanUpWorkspace);

  newTest({
    title: "Can handle 'x'",
    start: ['te|xt'],
    keysPressed: 'x',
    end: ['te|t'],
  });

  newTest({
    title: "Can handle 'Nx'",
    start: ['te|xt'],
    keysPressed: '2x',
    end: ['t|e'],
  });

  newTest({
    title: "Can handle 'Nx' and paste",
    start: ['t|ext'],
    keysPressed: '2xo<Esc>p',
    end: ['tt', 'e|x'],
  });

  newTest({
    title: "Can handle 'x' at end of line",
    start: ['one tw|o'],
    keysPressed: '^llxxxxxxxxx',
    end: ['|'],
  });

  newTest({
    title: "'x' with count does not go over EOL",
    start: ['one t|wo', 'three four'],
    keysPressed: '1000x',
    end: ['one |t', 'three four'],
  });

  newTest({
    title: "Can handle 'Ns'",
    start: ['|text'],
    keysPressed: '3s',
    end: ['|t'],
    endMode: Mode.Insert,
  });

  newTest({
    title: "Can handle 'Ns' at end of line",
    start: ['te|xt'],
    keysPressed: '3s',
{'fraction_non_alphanumeric': 0.2177760677183532, 'fraction_numerical': 0.0061562139284340135, 'mean_word_length': 2.9393939393939394, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1875888', 'n_tokens_mistral': 961, 'n_tokens_neox': 952, 'n_words': 246}