<commit_before>define([
    'collections/panels',
    'views/carousel'
], function (
    PanelsCollection,
    CarouselView
) {

    describe('CarouselView', function () {

        beforeEach(function () {

            var panelsCollection = new PanelsCollection();

            this.carouselView = new CarouselView({
                collection: panelsCollection
            }).render();

            panelsCollection.reset([
                { label: '1' },
                { label: '2' },
                { label: '3' },
                { label: '4' }
            ]);

        });

        it('should remove the most recently added panel when the delete key is pressed', function () {
            this.carouselView._deleteHandler();
            expect(this.carouselView.collection.pluck('label')).toEqual([
                '1',
                '2',
                '3'
            ]);
        });

        it('should rotate the carousel to the correct position when a panel is removed', function () {
            this.carouselView._deleteHandler();
            expect(this.carouselView.carouselRotation).toEqual(120);
        });

        it('should add a panel to the end of the carousel when the enter key is pressed', function () {
            this.carouselView._enterHandler();
            expect(this.carouselView.collection.pluck('label')).toEqual([<commit_msg>Fixed up carousel spec.<commit_after>define([
    'collections/panels',
    'views/carousel'
], function (
    PanelsCollection,
    CarouselView
) {

    describe('CarouselView', function () {

        beforeEach(function () {
            
            var panelsCollection = new PanelsCollection();
            
            this.carouselView = new CarouselView({
                collection: panelsCollection
            }).render();

            panelsCollection.reset([
                { label: '1' },
                { label: '2' },
                { label: '3' },
                { label: '4' }
            ]);

        });

        it('should remove the most recently added panel when the delete key is pressed', function () {
            this.carouselView._deleteHandler();
            expect(this.carouselView.collection.pluck('label')).toEqual([
                '1',
                '2',
                '3'
            ]);
        });

        it('should rotate the carousel to the correct position when a panel is removed', function () {
            this.carouselView._deleteHandler();
            expect(this.carouselView.carouselRotation).toEqual(120);
        });

        it('should add a panel to the end of the carousel when the enter key is pressed', function () {
            this.carouselView._enterHandler();
            expect(this.carouselView.collection.pluck('label')).toEqual([
{'fraction_non_alphanumeric': 0.11660649819494585, 'fraction_numerical': 0.007220216606498195, 'mean_word_length': 1.7517378351539226, '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': '3726615', 'n_tokens_mistral': 705, 'n_tokens_neox': 678, 'n_words': 166}