Skip to content

Commit

Permalink
fix unit tests #777
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed May 13, 2022
1 parent d43c0ee commit 13974b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[![npm](https://img.shields.io/badge/npm-DEV-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
![bower](https://img.shields.io/badge/bower-DEV-yellow.svg)
[![Build and test](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml/badge.svg?branch=devel&event=push)](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&c26faa3511e82bd2d51060e7a0bab729)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&d6690de257147887b9c38f73c9cdd577)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
![downloads](https://img.shields.io/npm/dm/jquery.terminal.svg?style=flat)
[![Paid Support](https://data.jsdelivr.com/v1/package/npm/jquery.terminal/badge?style=rounded)](https://www.jsdelivr.com/package/npm/jquery.terminal)
[![](https://img.shields.io/badge/paid-support-354465.svg)](https://support.jcubic.pl/)
Expand Down
7 changes: 4 additions & 3 deletions __tests__/terminal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6383,15 +6383,16 @@ describe('Terminal plugin', function() {
height: 100,
numRows: 10
});
var scroller = term.find('.terminal-scroller');
it('should change scrollTop', function() {
for (var i = 0; i < 20; i++) {
term.echo('text ' + i);
}
var pos = term.prop('scrollTop');
var pos = scroller.prop('scrollTop');
term.scroll(10);
expect(term.prop('scrollTop')).toEqual(pos + 10);
expect(scroller.prop('scrollTop')).toEqual(pos + 10);
term.scroll(-10);
expect(term.prop('scrollTop')).toEqual(pos);
expect(scroller.prop('scrollTop')).toEqual(pos);
});
});
describe('logout/token', function() {
Expand Down

0 comments on commit 13974b9

Please sign in to comment.