<commit_before>define([
  'frozen/InputManager',
  'frozen/MouseAction',
  'frozen/GameAction',
  'frozen/utils/insideCanvas'
], function(InputManager, MouseAction, GameAction, insideCanvas){

  'use strict';

  describe('InputManager', function(){
    var im;
    var gameAction;
    var mockEvent;

    beforeEach(function(){
      im = new InputManager();
      gameAction = new GameAction();

      mockEvent = {
        changedTouches: [],
        preventDefault: jasmine.createSpy('preventDefault'),
        keyCode: 'b',
        clientX: 12,
        clientY: 12
      };

      spyOn(im, 'getMouseLoc').andReturn({
        x: 12,
        y: 12
      });
    });

    it('should default to empty array of keyActions', function(){
      expect(im.keyActions).toEqual([]);
      expect(Array.isArray(im.keyActions)).toBe(true);
      expect(im.keyActions.length).toBe(0);
    });

    it('should instantiate a MouseAction as mouseAction upon newing up', function(){
      expect(im.mouseAction instanceof MouseAction).toBe(true);<commit_msg>call destroy after each test<commit_after>define([
  'frozen/InputManager',
  'frozen/MouseAction',
  'frozen/GameAction',
  'frozen/utils/insideCanvas'
], function(InputManager, MouseAction, GameAction, insideCanvas){

  'use strict';

  describe('InputManager', function(){
    var im;
    var gameAction;
    var mockEvent;

    beforeEach(function(){
      im = new InputManager();
      gameAction = new GameAction();

      mockEvent = {
        changedTouches: [],
        preventDefault: jasmine.createSpy('preventDefault'),
        keyCode: 'b',
        clientX: 12,
        clientY: 12
      };

      spyOn(im, 'getMouseLoc').andReturn({
        x: 12,
        y: 12
      });
    });

    afterEach(function(){
      im.destroy();
    });

    it('should default to empty array of keyActions', function(){
      expect(im.keyActions).toEqual([]);
      expect(Array.isArray(im.keyActions)).toBe(true);
      expect(im.keyActions.length).toBe(0);
    });

    it('should instantiate a MouseAction as mouseAction upon newing up', function(){
      expect(im.mouseAction instanceof MouseAction).toBe(true);
{'fraction_non_alphanumeric': 0.13842592592592592, 'fraction_numerical': 0.008333333333333333, 'mean_word_length': 2.9870848708487086, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7117888', 'n_tokens_mistral': 670, 'n_tokens_neox': 632, 'n_words': 137}