<commit_before>
describe("test group", function () {
  it('jhmm', function () {
    var t = true;
    expect(t).toBeTruthy();
  })
});<commit_msg>Writteln tests for 'register' and 'getModel' method<commit_after>describe("Fat Model", function () {
  var $FatModelProvider;

  beforeEach(module('FatModelProvider'));

  beforeEach(inject(function(_$FatModelProvider_) {
    $FatModelProvider = _$FatModelProvider_;
  }));

  describe('Test method "register"', function () {
    it('Test whether fatModel registers properly models', function () {
      $FatModelProvider.register({
        name: 'model-1',
        promise: function () {},
        success: function () {},
        error: function () {}
      });

      var model = $FatModelProvider.getModel('model-1');
      var requiredMethod = ['$on', 'fetch', 'refresh'];

      for (var i = requiredMethod.length - 1; i >= 0; i--) {
        expect(requiredMethod[i] in model).toBeTruthy();
      };
    });

    it('Test whether fatModel register method throw error', function () {
      var register = function () {
        $FatModelProvider.register({
          name: 'model-1'
        });
      };

      expect(register).toThrowError('[FatModel:Register:Error] - Missing property "promise"!');
    });
  });

  describe('Test method "getModel"', function () {
    it('Test whether fatModel register method throw error', function () {
      var getModel = function () {
        $FatModelProvider.getModel('model-test');
      };

      expect(getModel).toThrowError('[FatModel:getModel:Error] - Model "model-test" does not exist.');
    });
  });
});
{'fraction_non_alphanumeric': 0.16251556662515568, 'fraction_numerical': 0.00311332503113325, 'mean_word_length': 3.152454780361757, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5796612', 'n_tokens_mistral': 468, 'n_tokens_neox': 457, 'n_words': 104}