Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Dec 6, 2021
1 parent 9179b41 commit 10c4eee
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,9 @@
* fix link color to pass WCAG contrast ratio
* remove tabindex attribute on links
* add label to clipboard textarea for a11y
* allow to escape angle brackets in XML formatting [#710](https://github.com/jcubic/jquery.terminal/issues/710)
* fix black line before the image [#708](https://github.com/jcubic/jquery.terminal/issues/708)


## 2.29.5
### Bugfix
Expand Down
2 changes: 1 addition & 1 deletion README.md
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&8b57ab044c94b635a5576fc9d72705db)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&90815d01d44b0c402ae7b2043086f506)](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
4 changes: 2 additions & 2 deletions __tests__/__snapshots__/terminal.spec.js.snap
Expand Up @@ -65,9 +65,9 @@ exports[`Terminal utils $.terminal.format should filter out attribute in JSON 1`
exports[`Terminal utils $.terminal.format should handle JSON 1`] = `"<span title=\\"foo\\" data-foo=\\"bar\\" data-text=\\"foo\\"><span>foo</span></span>"`;
exports[`Terminal utils $.terminal.format should handle emails 1`] = `"<a href=\\"mailto:jcubic@onet.pl\\" tabindex=\\"1000\\" data-text>jcubic@onet.pl</a>"`;
exports[`Terminal utils $.terminal.format should handle emails 1`] = `"<a href=\\"mailto:jcubic@onet.pl\\" data-text>jcubic@onet.pl</a>"`;

exports[`Terminal utils $.terminal.format should handle emails 2`] = `"<a href=\\"mailto:jcubic@onet.pl\\" tabindex=\\"1000\\" data-text>j</a><a href=\\"mailto:jcubic@onet.pl\\" tabindex=\\"1000\\" data-text>cubic@onet.pl</a>"`;
exports[`Terminal utils $.terminal.format should handle emails 2`] = `"<a href=\\"mailto:jcubic@onet.pl\\" data-text>j</a><a href=\\"mailto:jcubic@onet.pl\\" data-text>cubic@onet.pl</a>"`;

exports[`Terminal utils $.terminal.format should handle wider characters without formatting 1`] = `"<span style=\\"width: 24ch\\" data-text=\\"ターミナルウィンドウは黒\\"><span style=\\"width: 24ch\\"><span style=\\"width: 2ch\\">タ</span><span style=\\"width: 2ch\\">ー</span><span style=\\"width: 2ch\\">ミ</span><span style=\\"width: 2ch\\">ナ</span><span style=\\"width: 2ch\\">ル</span><span style=\\"width: 2ch\\">ウ</span><span style=\\"width: 2ch\\">ィ</span><span style=\\"width: 2ch\\">ン</span><span style=\\"width: 2ch\\">ド</span><span style=\\"width: 2ch\\">ウ</span><span style=\\"width: 2ch\\">は</span><span style=\\"width: 2ch\\">黒</span></span></span><span style=\\"width: 4ch\\" data-text=\\"です\\"><span><span style=\\"width: 4ch\\"><span style=\\"width: 2ch\\">で</span><span style=\\"width: 2ch\\">す</span></span></span></span>"`;
Expand Down
6 changes: 4 additions & 2 deletions __tests__/terminal.spec.js
Expand Up @@ -3595,7 +3595,6 @@ describe('Terminal plugin', function() {
term.focus();
term.insert('foo bar');
var clip = term.find('textarea');
clip.val(clip.val().replace(/.$/, ''));
doc.one('keydown', function(e) {
expect(e.which).toBe(8);
setTimeout(function() {
Expand All @@ -3606,7 +3605,10 @@ describe('Terminal plugin', function() {
done();
}, 300);
});
doc.trigger('input');
setTimeout(function() {
clip.val(clip.val().replace(/.$/, ''));
doc.trigger('input');
}, 100);
});
});
describe('enter text', function() {
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal-2.29.5.js
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Mon, 06 Dec 2021 18:37:32 +0000
* Date: Mon, 06 Dec 2021 21:26:30 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -5102,7 +5102,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: 'DEV',
date: 'Mon, 06 Dec 2021 18:37:32 +0000',
date: 'Mon, 06 Dec 2021 21:26:30 +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.29.5.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/jquery.terminal.js
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Mon, 06 Dec 2021 18:37:32 +0000
* Date: Mon, 06 Dec 2021 21:26:30 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -5102,7 +5102,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: 'DEV',
date: 'Mon, 06 Dec 2021 18:37:32 +0000',
date: 'Mon, 06 Dec 2021 21:26:30 +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.

2 changes: 1 addition & 1 deletion js/pipe.js
Expand Up @@ -396,7 +396,7 @@
error(sprintf(strings(term).commandNotFound, cmd.name));
}
} else {
term = term.duplicate();
//term = term.duplicate();
$.extend(term, tty);
var stop_error = false;
var promise = loop(function(cmd) {
Expand Down

0 comments on commit 10c4eee

Please sign in to comment.