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

    var SELECTOR = '.fc-header-title h2';

    beforeEach(function() {
        affix('#cal');
    });

    describe('when default', function() {

        var viewWithFormat = [
            { view: 'month', expected: 'June 2014' },
            { view: 'basicWeek', expected: 'Jun 8 - 14 2014' },
            { view: 'agendaWeek', expected: 'Jun 8 - 14 2014' },
            { view: 'basicDay', expected: 'June 12 2014' },
            { view: 'agendaDay', expected: 'June 12 2014' }
        ];

        beforeEach(function() {
            $('#cal').fullCalendar({
                defaultDate: '2014-06-12'
            });
        });

        it('should have default values', function() {
            var cal = $('#cal');

            for (var i = 0; i <  viewWithFormat.length; i++) {
                var crtView = viewWithFormat[i];
                cal.fullCalendar('changeView', crtView.view);
                expect(cal.find(SELECTOR).text()).toBe(crtView.expected);
            };
        });
    });

    describe('when set on a per-view basis', function() {

        var viewWithFormat = [
            { view: 'month', expected: '2014, June' },
            { view: 'basicWeek', expected: '8 - 14 6 2014' },
            { view: 'agendaWeek', expected: '8 - 14, 6, 2014' },
            { view: 'basicDay', expected: 'Thursday June 12 2014' },
            { view: 'agendaDay', expected: 'Thursday, June, 12, 2014' }
        ];

        beforeEach(function() {<commit_msg>moment-2.8 compatibility, automated tests, LL formatting change<commit_after>describe('titleFormat', function() {

    var SELECTOR = '.fc-header-title h2';

    beforeEach(function() {
        affix('#cal');
    });

    describe('when default', function() {

        var viewWithFormat = [
            { view: 'month', expected: 'June 2014' },
            { view: 'basicWeek', expected: /Jun 8 - 14,? 2014/ },  // moment changed LL defaults after 2.8
            { view: 'agendaWeek', expected: /Jun 8 - 14,? 2014/ }, // "
            { view: 'basicDay', expected: /June 12,? 2014/ },      // "
            { view: 'agendaDay', expected: /June 12,? 2014/ }      // "
        ];

        beforeEach(function() {
            $('#cal').fullCalendar({
                defaultDate: '2014-06-12'
            });
        });

        it('should have default values', function() {
            var cal = $('#cal');

            for (var i = 0; i <  viewWithFormat.length; i++) {
                var crtView = viewWithFormat[i];
                cal.fullCalendar('changeView', crtView.view);
                expect(cal.find(SELECTOR).text()).toMatch(crtView.expected);
            };
        });
    });

    describe('when set on a per-view basis', function() {

        var viewWithFormat = [
            { view: 'month', expected: '2014, June' },
            { view: 'basicWeek', expected: '8 - 14 6 2014' },
            { view: 'agendaWeek', expected: '8 - 14, 6, 2014' },
            { view: 'basicDay', expected: 'Thursday June 12 2014' },
            { view: 'agendaDay', expected: 'Thursday, June, 12, 2014' }
        ];

        beforeEach(function() {
{'fraction_non_alphanumeric': 0.16304689959080895, 'fraction_numerical': 0.04658482845451684, 'mean_word_length': 1.8274021352313168, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4868026', 'n_tokens_mistral': 1068, 'n_tokens_neox': 891, 'n_words': 236}