Skip to content

Commit

Permalink
test: add test for number value
Browse files Browse the repository at this point in the history
  • Loading branch information
webdiscus committed Aug 8, 2024
1 parent afb8a71 commit 4e6e164
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/functional.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,13 @@ describe('handling numbers', () => {
expect(esc(received)).toEqual(esc(expected));
});

test(`ansis.bold(123)`, () => {
const num = 123;
const received = ansis.bold(num);
const expected = '\x1b[1m123\x1b[22m';
expect(esc(received)).toEqual(esc(expected));
});

test(`ansis.red(123)`, () => {
const num = 123;
const received = ansis.red(num);
Expand Down

0 comments on commit 4e6e164

Please sign in to comment.