Skip to content

Commit

Permalink
fixed test titles
Browse files Browse the repository at this point in the history
  • Loading branch information
stroncium committed Feb 27, 2019
1 parent e036d64 commit a330355
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ test('supports unicode surrogate pairs', t => {
t.is(m('a\uD83C\uDE00bc\uD83C\uDE00d\uD83C\uDE00', 2, {hard: true}), 'a\n\uD83C\uDE00\nbc\n\uD83C\uDE00\nd\n\uD83C\uDE00');
});

test('#23, whitespaces is properly wrapped', t => {
test('#23, properly wraps whitespace with no trimming', t => {
t.is(m(' ', 2, {trim: false}), ' \n ');
t.is(m(' ', 2, {trim: false, hard: true}), ' \n ');
});

test('#25, whitespace at the end of line is treated properly with no trimming', t => {
test('#25, properly wraps whitespace between words with no trimming', t => {
t.is(m('foo bar', 3), 'foo\nbar');
t.is(m('foo bar', 3, {hard: true}), 'foo\nbar');
t.is(m('foo bar', 3, {trim: false}), 'foo\n \nbar');
Expand All @@ -131,12 +131,12 @@ test('#26, does not multiplicate leading spaces with no trimming', t => {
t.is(m(' a ', 10, {trim: false}), ' a ');
});

test('#27, does not remove leading space when line starts with ansi escape and no trimming', t => {
test('#27, does not remove leading spaces when line starts with ansi escape when no trimming', t => {
t.is(m(chalk.bgGreen(` ${chalk.black('OK')} `), 100, {trim: false}), chalk.bgGreen(` ${chalk.black('OK')} `));
t.is(m(chalk.bgGreen(` ${chalk.black('OK')} `), 100, {trim: false}), chalk.bgGreen(` ${chalk.black('OK')} `));
});

test('#24, only trims leading and trailing whitespace on actual wrapped lines', t => {
test('#24, trims leading and trailing whitespace only on actual wrapped lines and only with trimming', t => {
t.is(m(' foo bar ', 6), 'foo\nbar');
t.is(m(' foo bar ', 42), 'foo bar');
t.is(m(' foo bar ', 42, {trim: false}), ' foo bar ');
Expand Down

0 comments on commit a330355

Please sign in to comment.