<commit_before>define(
  ['module', 'jquery', 'jasmine-jquery', 'obpev']
, function(module, $, jj, obpev) {

    describe(module.id, function(){

         beforeEach(function() {
            obpev.init();
        });

        describe('load/initialization', function() {
            it('load', function(){
                expect(obpev).toBeDefined();
            }); // it
            var events = obpev.events;
            it('initialized state', function() {
                expect(events).toEqual({
                     "obp:filter-start"          : {}
                   , "obp:filter-change"         : {}
                   , "obp:filter-mode-change"    : {}
                   , "obp:filter-complete"       : {}
                   , "obp:bibliography-added"    : {}
                   , "obp:search-term-change"    : {}
                   , "obp:browse-term-change"    : {}
               });
            }); // it
        }); // describe

        describe('un/supported event', function(){
            it('unsupported event throws exception', function() {
                expect(function() {
                    obpev.subscribe('obp:__not_existing', module.id, function(){});
                }).toThrow();
            }); // it
            it('supported event does not throw exception', function() {
                expect(function() {
                    obpev.subscribe('obp:filter-start', module.id, function(){});
                }).not.toThrow();
            });
        }); // describe

        describe('registered callback handling', function() {
            it('subscribed callback fired', function(){
                var event = 'obp:filter-start';
                var callback = jasmine.createSpy('callback');
                obpev.subscribe(event, module.id, callback);
                obpev.raise(event, module.id);
                expect(callback).toHaveBeenCalled();
            });
            it('unsubscribed callback not fired', function(){
                var event = 'obp:filter-start';
                var callback = jasmine.createSpy('callback');
                obpev.subscribe(event, module.id, callback);
                obpev.unsubscribe(event, module.id);
                obpev.raise(event, module.id);
                expect(callback).not.toHaveBeenCalled();
            });
        }); // describe

    });
});<commit_msg>changed some test values due to removal of obp-filter-start event<commit_after>define(
  ['module', 'jquery', 'jasmine-jquery', 'obpev']
, function(module, $, jj, obpev) {

    describe(module.id, function(){

         beforeEach(function() {
            obpev.init();
        });

        describe('load/initialization', function() {
            it('load', function(){
                expect(obpev).toBeDefined();
            }); // it
            var events = obpev.events;
            it('initialized state', function() {
                expect(events).toEqual({
                     "obp:filter-change"         : {}
                   , "obp:filter-mode-change"    : {}
                   , "obp:filter-complete"       : {}
                   , "obp:bibliography-added"    : {}
                   , "obp:search-term-change"    : {}
                   , "obp:browse-term-change"    : {}
               });
            }); // it
        }); // describe

        describe('un/supported event', function(){
            it('unsupported event throws exception', function() {
                expect(function() {
                    obpev.subscribe('obp:__not_existing', module.id, function(){});
                }).toThrow();
            }); // it
            it('supported event does not throw exception', function() {
                expect(function() {
                    obpev.subscribe('obp:filter-change', module.id, function(){});
                }).not.toThrow();
            });
        }); // describe

        describe('registered callback handling', function() {
            it('subscribed callback fired', function(){
                var event = 'obp:filter-change';
                var callback = jasmine.createSpy('callback');
                obpev.subscribe(event, module.id, callback);
                obpev.raise(event, module.id);
                expect(callback).toHaveBeenCalled();
            });
            it('unsubscribed callback not fired', function(){
                var event = 'obp:filter-change';
                var callback = jasmine.createSpy('callback');
                obpev.subscribe(event, module.id, callback);
                obpev.unsubscribe(event, module.id);
                obpev.raise(event, module.id);
                expect(callback).not.toHaveBeenCalled();
            });
        }); // describe

    });
});
{'fraction_non_alphanumeric': 0.14664123755032846, 'fraction_numerical': 0.0, 'mean_word_length': 1.4960338445267054, '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': '7534912', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1176, 'n_words': 210}