<commit_before>describe('bodyModule', function() {

    beforeEach(module('bodyModule', 'ngCookies'));

    describe('bodyCtrl controller', function() {

        var scope, cookieStore, location;
        var cookieHistory;
        var historyItem = {text: 'My History Item', url: '/MyUrl'};

        beforeEach(
            inject(function($rootScope, $injector, $controller, $location) {
                cookieHistory = [{text: 'My Cookie History Item 1', url: '/MyCookieUrl1'}, {text: 'My Cookie History Item 2', url: '/MyCookieUrl2'}];
                scope = $rootScope.$new();
                cookieStore = $injector.get('$cookieStore');
                cookieStore.put('history', cookieHistory);
                location = $location;
                $controller("bodyCtrl", {
                    $scope: scope,
                    $cookieStore: cookieStore,
                    $location: location
                });
            })
        );

        describe('addHistoryItem function', function() {
            it('should load history from cookies', function() {
                expect(scope.history.length).toEqual(cookieHistory.length + 1000);
            });
            it('should add the history item to the array', function() {
                scope.addHistoryItem(historyItem.text);
                expect(scope.history.length).toEqual(cookieHistory.length + 1);
            });<commit_msg>Checking whether JS tests fail in Travis<commit_after>describe('bodyModule', function() {

    beforeEach(module('bodyModule', 'ngCookies'));

    describe('bodyCtrl controller', function() {

        var scope, cookieStore, location;
        var cookieHistory;
        var historyItem = {text: 'My History Item', url: '/MyUrl'};

        beforeEach(
            inject(function($rootScope, $injector, $controller, $location) {
                cookieHistory = [{text: 'My Cookie History Item 1', url: '/MyCookieUrl1'}, {text: 'My Cookie History Item 2', url: '/MyCookieUrl2'}];
                scope = $rootScope.$new();
                cookieStore = $injector.get('$cookieStore');
                cookieStore.put('history', cookieHistory);
                location = $location;
                $controller("bodyCtrl", {
                    $scope: scope,
                    $cookieStore: cookieStore,
                    $location: location
                });
            })
        );

        describe('addHistoryItem function', function() {
            it('should load history from cookies', function() {
                expect(scope.history.length).toEqual(cookieHistory.length);
            });
            it('should add the history item to the array', function() {
                scope.addHistoryItem(historyItem.text);
                expect(scope.history.length).toEqual(cookieHistory.length + 1);
            });
{'fraction_non_alphanumeric': 0.1260593220338983, 'fraction_numerical': 0.0049435028248587575, 'mean_word_length': 2.010626992561105, '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': '5266330', 'n_tokens_mistral': 717, 'n_tokens_neox': 665, 'n_words': 167}