<commit_before>var expect = require('expect');

var KeyCommands = require('../KeyCommands');
var BaseKey = require('../Keys/BaseKey');

var specialStub = sinon.spy();
class SpecialKey < BaseKey {
  static getName() {
    return 'special-key';
  }

  matches() {
    return true;
  }

  down(callback) {
    specialStub();

    callback({
      content: {a: 1}, selection: "b", stopPropagation: true
    });
  }
}

var magicStub = sinon.spy();
class MagicKey < BaseKey {
  static getName() {
    return 'magic-key';
  }

  matches() {
    return true;
  }

  down(callback) {
    magicStub();

    callback({
      content: {b: 2}, selection: "d", stopPropagation: true
    });
  }
}

describe('KeyCommands', () => {<commit_msg>this isn't ruby, ha ha<commit_after>var expect = require('expect');

var KeyCommands = require('../KeyCommands');
var BaseKey = require('../Keys/BaseKey');

var specialStub = sinon.spy();
class SpecialKey extends BaseKey {
  static getName() {
    return 'special-key';
  }

  matches() {
    return true;
  }

  down(callback) {
    specialStub();

    callback({
      content: {a: 1}, selection: "b", stopPropagation: true
    });
  }
}

var magicStub = sinon.spy();
class MagicKey extends BaseKey {
  static getName() {
    return 'magic-key';
  }

  matches() {
    return true;
  }

  down(callback) {
    magicStub();

    callback({
      content: {b: 2}, selection: "d", stopPropagation: true
    });
  }
}

describe('KeyCommands', () => {
{'fraction_non_alphanumeric': 0.16677966101694916, 'fraction_numerical': 0.002711864406779661, 'mean_word_length': 3.043835616438356, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '7379348', 'n_tokens_mistral': 505, 'n_tokens_neox': 500, 'n_words': 118}