<commit_before>// hello.events.js


describe('hello events', function(){

	it('should bind handler using hello.on( event_name, handler ) and trigger hello.emit', function(done){
		hello.on('auth.login', function(){
			done();
		});

		hello.emit('auth.login');
	});

	it('should support legacy handlers using hello.subscribe( event_name, handler ) and trigger hello.emit', function(done){
		hello.subscribe('auth.login', function(){
			done();
		});

		hello.emit('auth.login');
	});
<commit_msg>Spec legacy events, subscribe<commit_after>// hello.events.js


describe('hello events', function(){

	it('should bind handler using hello.on( event_name, handler ) and trigger hello.emit', function(done){
		function handler(){
			done();
		}

		hello.on('auth.login', handler);
		hello.emit('auth.login');
		hello.off('auth.login', handler);
	});

	it('should support legacy handlers using hello.subscribe( event_name, handler ) and trigger hello.emit', function(done){

		function handler(){
			done();
		}

		hello.subscribe('auth.login', handler);
		hello.emit('auth.login');
		hello.unsubscribe('auth.login', handler);
	});

{'fraction_non_alphanumeric': 0.17155555555555554, 'fraction_numerical': 0.0, 'mean_word_length': 4.715736040609137, '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': '4425005', 'n_tokens_mistral': 380, 'n_tokens_neox': 329, 'n_words': 83}