<commit_before>//Unit testing 
  describe('birthday', function() {
  var mainCtrl, scope;
  var urlPath = "http://localhost:8080/#/ddd";
  beforeEach(module('birthday'))
  beforeEach(inject(function($controller, $rootScope){
  //crucial: 
  scope= $rootScope.$new();
  mainCtrl = $controller('MainController', {$scope: scope});
  }));
  describe('MainController', function(){
    it("invitation", function(){
      expect(scope.setMessage("Jess", 0)).toEqual("Hi Jess, You are invited to ");
      expect(scope.setMessage("Sue", 1)).toEqual("Hi Sue, You have RSVPed to ");
      expect(scope.setMessage("Matt", 2)).toEqual("Hi Matt, You won't be coming to ");
      expect(scope.setMessage("Lu", 3)).toEqual("Hi Lu, You have canceled your RSVP to ");
      expect(scope.setMessage("John", 4)).toEqual("Hi John, You are invited to ");
      expect(scope.setMessage("", 0)).toEqual("Hi stranger, looks like you are not on the guest list to ");
    });
    it("Check guest list", function(){
      var val = "John", 
      arr = [{
        "name": "John",
        "rsvp": "0",
        "number": "1"
        },
        {
        "name": "<NAME>",
        "rsvp": "2",
        "number": "2"
        }];
      expect(scope.getGuest("john", arr).name).toBe("John");
      expect(scope.getGuest("linden and daisy", arr).name).toBe("<NAME>");
      expect(scope.getGuest("", arr).name).toBe(null);
      expect(scope.getButtons(scope.getGuest("john", arr).rsvp)).toEqual(['RSVP', 'Cancel']);
      expect(scope.getButtons(scope.getGuest("linden and daisy", arr).rsvp)).toEqual(['RSVP', 'Decide later']);

    });
  });
});<commit_msg>edit tests<commit_after>//Unit testing 
  describe('birthday', function() {
  var mainCtrl, scope;
  var urlPath = "http://localhost:8080/#/ddd";
  beforeEach(module('birthday'))
  beforeEach(inject(function($controller, $rootScope){
  //crucial: 
  scope= $rootScope.$new();
  mainCtrl = $controller('MainController', {$scope: scope});
  }));
  describe('MainController', function(){
    it("invitation", function(){
      expect(scope.setMessage("Jess", 0)).toEqual("Hi Jess, You are invited to ");
      expect(scope.setMessage("Sue", 1)).toEqual("Hi Sue, You have RSVPed to ");
      expect(scope.setMessage("Matt", 2)).toEqual("Hi Matt, You won't be coming to ");
      expect(scope.setMessage("Lu", 3)).toEqual("Hi Lu, You have canceled your RSVP to ");
      expect(scope.setMessage("John", 4)).toEqual("Hi John, You are invited to ");
      expect(scope.setMessage("", 0)).toEqual("Hi stranger, looks like you are not on the guest list to ");
    });
    it("Check guest list", function(){
      var arr = [{
        "name": "John",
        "rsvp": "0",
        "number": "1"
        },
        {
        "name": "<NAME>",
        "rsvp": "2",
        "number": "2"
        }];
      expect(scope.getGuest("john", arr).name).toBe("John");
      expect(scope.getGuest("linden and daisy", arr).name).toBe("<NAME>");
      expect(scope.getGuest("", arr).name).toBe(null);
      expect(scope.getButtons(scope.getGuest("john", arr).rsvp)).toEqual(['RSVP', 'Cancel']);
      expect(scope.getButtons(scope.getGuest("linden and daisy", arr).rsvp)).toEqual(['RSVP', 'Decide later']);

    });
  });
});
{'fraction_non_alphanumeric': 0.20272783632982022, 'fraction_numerical': 0.008679479231246125, 'mean_word_length': 3.519607843137255, 'pattern_counts': {'":': 12, '<': 7, '<?xml version=': 0, '>': 7, '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': '708122', 'n_tokens_mistral': 1044, 'n_tokens_neox': 1006, 'n_words': 223}