Skip to content

Commit

Permalink
WIP: squash; refactor the unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Dec 17, 2013
1 parent fc3a7b2 commit f6ae0db
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/jqLiteSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1122,14 +1122,12 @@ describe('jqLite', function() {

it('should deregister specific listener within the listener and call subsequent listeners', function() {
var aElem = jqLite(a),
clickOnceSpy = jasmine.createSpy('clickOnce'),
clickSpy = jasmine.createSpy('click'),
clickOnceListener = function () {
aElem.off('click', clickOnceListener);
return clickOnceSpy();
};
clickOnceSpy = jasmine.createSpy('clickOnce').andCallFake(function() {
aElem.off('click', clickOnceSpy);
});

aElem.on('click', clickOnceListener);
aElem.on('click', clickOnceSpy);
aElem.on('click', clickSpy);

browserTrigger(a, 'click');
Expand Down

0 comments on commit f6ae0db

Please sign in to comment.