Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Jun 20, 2017
1 parent 56ce0ee commit 2fac8f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/blots/scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ describe('Scroll', function() {
let scroll = this.initialize(Scroll, '<p>Hello World!</p>');
spyOn(scroll.emitter, 'emit').and.callThrough();
scroll.insertAt(5, '!');
expect(scroll.emitter.emit).toHaveBeenCalledWith(Emitter.events.SCROLL_OPTIMIZE, jasmine.any(Array));
expect(scroll.emitter.emit).toHaveBeenCalledWith(Emitter.events.SCROLL_OPTIMIZE, jasmine.any(Array), jasmine.any(Object));
});

it('user change', function(done) {
let scroll = this.initialize(Scroll, '<p>Hello World!</p>');
spyOn(scroll.emitter, 'emit').and.callThrough();
scroll.domNode.firstChild.appendChild(document.createTextNode('!'));
setTimeout(function() {
expect(scroll.emitter.emit).toHaveBeenCalledWith(Emitter.events.SCROLL_OPTIMIZE, jasmine.any(Array));
expect(scroll.emitter.emit).toHaveBeenCalledWith(Emitter.events.SCROLL_OPTIMIZE, jasmine.any(Array), jasmine.any(Object));
expect(scroll.emitter.emit).toHaveBeenCalledWith(Emitter.events.SCROLL_UPDATE, Emitter.sources.USER, jasmine.any(Array));
done();
}, 1);
Expand Down

0 comments on commit 2fac8f4

Please sign in to comment.