Skip to content

Commit

Permalink
fix deep scan found issue in unit test code
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Jan 5, 2025
1 parent a76b868 commit 88c6adb
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions __tests__/terminal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1416,17 +1416,10 @@ describe('Terminal utils', function() {
var lines = $.terminal.split_equal(string, cols[i]);
var max_len;
var lengths;
if (fn) {
lengths = lines.map(function(line) {
return fn(line).length;
});
max_len = fn(string).length;
} else {
lengths = lines.map(function(line) {
return line.length;
});
max_len = fn.length;
}
lengths = lines.map(function(line) {
return fn(line).length;
});
max_len = fn(string).length;
lengths.forEach(function(length, j) {
var max = max_len < cols[i] ? max_len : cols[i];
if (j < lengths - 1) {
Expand Down

0 comments on commit 88c6adb

Please sign in to comment.