diff options
author | isaacs <i@izs.me> | 2021-02-01 23:47:20 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2021-02-01 23:47:33 +0300 |
commit | 9cdcf3a8ee254683c2c375bf9a8e488b7ba0f530 (patch) | |
tree | c7adae089333d2a7546bcfb2d2f4cba3094865a4 /test | |
parent | 8c5ca2f516f5ac87f3bbd7f1fd95c0b283a21f14 (diff) |
Add test for ansi-trim module
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/utils/ansi-trim.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lib/utils/ansi-trim.js b/test/lib/utils/ansi-trim.js new file mode 100644 index 000000000..de8d39293 --- /dev/null +++ b/test/lib/utils/ansi-trim.js @@ -0,0 +1,5 @@ +const t = require('tap') +const ansiTrim = require('../../../lib/utils/ansi-trim.js') +const chalk = require('chalk') +t.equal(ansiTrim('foo'), 'foo', 'does nothing if no ansis') +t.equal(ansiTrim(chalk.red('foo')), 'foo', 'strips out ansis') |