Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Mar 20, 2024
1 parent 5c1b66e commit 1c7dffc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions __tests__/terminal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2912,14 +2912,17 @@ describe('sub plugins', function() {
expect(window.ResizeObserver).toHaveBeenCalled();
expect(typeof callback).toBe('function');
});
it('should call callback', function() {
it('should call callback', function(done) {
div.resizer(test.a);
div.resizer(test.b);
// original ResizeObserver is called on init and plugin skip it
callback();
callback();
expect(test.a).toHaveBeenCalled();
expect(test.b).toHaveBeenCalled();
setTimeout(() => {
expect(test.a).toHaveBeenCalled();
expect(test.b).toHaveBeenCalled();
done();
}, 0);
});
it('should remove resizer', function() {
div.resizer(test.a);
Expand Down

0 comments on commit 1c7dffc

Please sign in to comment.