<commit_before>/**
 * Created by tonte on 9/19/17.
 */
define(['bytepushers', 'Employee'], function(BytePushers) {
    describe("Tester", function(){
        it('should be able to call private methods', function () {
            var tester = (new BytePushers.Tester()).getInstance(Employee);
            expect(tester).toBeDefined();
            expect(tester._privates).toBeDefined();
            expect(tester._privates["getFirstName"]).toBeDefined();
            expect(tester._privates.getFirstName()).toEqual("Sally");
            expect(tester._privates.calculateAge).toBeDefined();
            expect(tester._privates.calculateAge()).toEqual(20);
        });


        it('should be able to call public methods', function () {
            var actualBirthDate = "07/2/1970";
            var expectedAge = new Date().getFullYear() - new Date(actualBirthDate).getFullYear();
            var emp = new Employee(null, "M", undefined, actualBirthDate, null , "part-time", undefined);

            expect(emp.getFullName).toBeDefined();
            expect(emp.getFullName()).toEqual("<NAME>");
            expect(emp.getDepartment).toBeDefined();
            expect(emp.getDepartment()).toEqual("Human Resources");
            expect(emp.getAge).toBeDefined();
            expect(emp.getAge()).toEqual(expectedAge);
            expect(emp.getType).toBeDefined();
            expect(emp.getType()).toEqual("part-time");

        });

        /*it('should not be able to call private methods', function () {
            var actualBirthDate = "07/2/1970";
            var expectedAge = new Date().getFullYear() - new Date(actualBirthDate).getFullYear();
            var emp = new Employee(null, "M", undefined, actualBirthDate, null , "part-time", undefined);

            expect(emp).not.toBeDefined();
        });*/


    });
});<commit_msg>Added to the third test to check if private is defined.<commit_after>/**
 * Created by tonte on 9/19/17.
 */
define(['bytepushers', 'Employee'], function(BytePushers) {
    describe("Tester", function(){
        it('should be able to call private methods', function () {
            var tester = (new BytePushers.Tester()).getInstance(Employee);
            expect(tester).toBeDefined();
            expect(tester._privates).toBeDefined();
            expect(tester._privates["getFirstName"]).toBeDefined();
            expect(tester._privates.getFirstName()).toEqual("Sally");
            expect(tester._privates.calculateAge).toBeDefined();
            expect(tester._privates.calculateAge()).toEqual(20);
        });


        it('should be able to call public methods', function () {
            var actualBirthDate = "07/2/1970";
            var expectedAge = new Date().getFullYear() - new Date(actualBirthDate).getFullYear();
            var emp = new Employee(null, "M", undefined, actualBirthDate, null , "part-time", undefined);

            expect(emp.getFullName).toBeDefined();
            expect(emp.getFullName()).toEqual("<NAME>");
            expect(emp.getDepartment).toBeDefined();
            expect(emp.getDepartment()).toEqual("Human Resources");
            expect(emp.getAge).toBeDefined();
            expect(emp.getAge()).toEqual(expectedAge);
            expect(emp.getType).toBeDefined();
            expect(emp.getType()).toEqual("part-time");

        });

        it('should not be able to call private methods', function () {
            var actualBirthDate = "07/2/1970";
            var expectedAge = new Date().getFullYear() - new Date(actualBirthDate).getFullYear();
            var emp = new Employee(null, "M", undefined, actualBirthDate, null , "part-time", undefined);

            expect(emp.getFirstName).not.toBeDefined();
            expect(emp.getMiddleName).not.toBeDefined();
            expect(emp.getLastName).not.toBeDefined();
            expect(emp.calculateAge).not.toBeDefined();
            expect(emp.getSalary).not.toBeDefined();
        });


    });
});
{'fraction_non_alphanumeric': 0.1508097165991903, 'fraction_numerical': 0.01062753036437247, 'mean_word_length': 2.663577386468953, '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': '4506759', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1078, 'n_words': 202}