Skip to content

Commit

Permalink
add unit tests #726
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Feb 9, 2022
1 parent e44bcfb commit 3326287
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 13 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&f89d5d7e8a915c7f958e2407b66acf15)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&7451034b2403b499f3144585d7a65dc4)](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
6 changes: 6 additions & 0 deletions __tests__/terminal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5039,6 +5039,12 @@ describe('Terminal plugin', function() {
});
await test();
});
it('should animation insert', async () => {
await term.insert('hello', { typing: true, delay: 0});
expect(term.get_command()).toEqual('hello');
await term.insert('_world', { typing: true, delay: 0});
expect(term.get_command()).toEqual('hello_world');
});
});

describe('exec', function() {
Expand Down
9 changes: 6 additions & 3 deletions js/jquery.terminal-2.31.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Tue, 04 Jan 2022 16:49:09 +0000
* Date: Wed, 05 Jan 2022 18:19:07 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -221,7 +221,10 @@
} else {
// Browser
// istanbul ignore next
factory(root.jQuery, root.wcwidth, root);
if (!root.jQuery) {
root.$ = root.cash;
}
factory(root.jQuery || root.cash, root.wcwidth, root);
}
})(function($, wcwidth, root, undefined) {
'use strict';
Expand Down Expand Up @@ -5136,7 +5139,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: 'DEV',
date: 'Tue, 04 Jan 2022 16:49:09 +0000',
date: 'Wed, 05 Jan 2022 18:19:07 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal-2.31.1.min.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion js/jquery.terminal-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@
} else {
// Browser
// istanbul ignore next
factory(root.jQuery, root.wcwidth, root);
if (!root.jQuery) {
root.$ = root.cash;
}
factory(root.jQuery || root.cash, root.wcwidth, root);
}
})(function($, wcwidth, root, undefined) {
'use strict';
Expand Down
9 changes: 6 additions & 3 deletions js/jquery.terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Tue, 04 Jan 2022 16:49:09 +0000
* Date: Wed, 05 Jan 2022 18:19:07 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -221,7 +221,10 @@
} else {
// Browser
// istanbul ignore next
factory(root.jQuery, root.wcwidth, root);
if (!root.jQuery) {
root.$ = root.cash;
}
factory(root.jQuery || root.cash, root.wcwidth, root);
}
})(function($, wcwidth, root, undefined) {
'use strict';
Expand Down Expand Up @@ -5136,7 +5139,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: 'DEV',
date: 'Tue, 04 Jan 2022 16:49:09 +0000',
date: 'Wed, 05 Jan 2022 18:19:07 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/jquery.terminal.min.js.map

Large diffs are not rendered by default.

0 comments on commit 3326287

Please sign in to comment.