Skip to content

Commit 613ddcb

Browse files
committed
test: add original orange color for fallback tests
1 parent f1eef73 commit 613ddcb

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let LF = '\n';
2929
* @param {{ open: string, close: string }} style
3030
* @return {Ansis}
3131
*/
32-
let createStyle = ({ p: props}, { open, close }) => {
32+
let createStyle = ({ p: props }, { open, close }) => {
3333
/**
3434
* Decorates a string with ANSI escape sequences.
3535
* @param {unknown} arg The input value, can be any or a template string.

test/named-truecolor-fallback.test.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ describe('fallback named colors', () => {
99
const ansis16 = new Ansis(1); // force init with 16 colors
1010
const ansisBW = new Ansis(0); // force init with black & white
1111

12+
test('original orange color', async () => {
13+
const color = ansis16m.extend(colorNames);
14+
const received = color.orange('orange');
15+
const expected = 'orange';
16+
console.log(received);
17+
expect(received).toEqual(expected);
18+
});
19+
20+
test('original bgOrange color', async () => {
21+
const color = ansis16m.extend(colorNames);
22+
const received = color.bgOrange('orange');
23+
const expected = 'orange';
24+
console.log(received);
25+
expect(received).toEqual(expected);
26+
});
27+
1228
test('fallback orange to 256 colors', async () => {
1329
const color = ansis256.extend(colorNames);
1430
const received = color.orange('orange');
@@ -54,5 +70,4 @@ describe('fallback named colors', () => {
5470
const expected = 'orange';
5571
expect(received).toEqual(expected);
5672
});
57-
5873
});

0 commit comments

Comments
 (0)