@@ -4,15 +4,15 @@ import stripAnsi from 'strip-ansi';
4
4
import { IndicationBadge , IndicationType , Theme } from '../Theme' ;
5
5
6
6
describe ( 'Theme' , ( ) : void => {
7
- const text = 'text' ;
7
+ const text = { input : '\\{\\{\\{t\\}e\\}x{red t}\\}' , output : '{{{t}e}xt}' } ;
8
8
9
9
it ( 'Default' , ( ) : void => {
10
10
const theme = new Theme ( ) ;
11
11
12
- expect ( stripAnsi ( theme . paint ( text , IndicationType . Default ) ) ) . toBe ( text ) ;
13
- expect ( stripAnsi ( theme . paint ( text , IndicationType . Success ) ) ) . toBe ( text ) ;
14
- expect ( stripAnsi ( theme . paint ( text , IndicationType . Skip ) ) ) . toBe ( text ) ;
15
- expect ( stripAnsi ( theme . paint ( text , IndicationType . Error ) ) ) . toBe ( text ) ;
12
+ expect ( stripAnsi ( theme . paint ( text . input , IndicationType . Default ) ) ) . toBe ( text . output ) ;
13
+ expect ( stripAnsi ( theme . paint ( text . input , IndicationType . Success ) ) ) . toBe ( text . output ) ;
14
+ expect ( stripAnsi ( theme . paint ( text . input , IndicationType . Skip ) ) ) . toBe ( text . output ) ;
15
+ expect ( stripAnsi ( theme . paint ( text . input , IndicationType . Error ) ) ) . toBe ( text . output ) ;
16
16
17
17
expect ( stripAnsi ( theme . symbol ( IndicationType . Default ) ) ) . toBe ( stripAnsi ( figures . pointerSmall ) ) ;
18
18
expect ( stripAnsi ( theme . symbol ( IndicationType . Success ) ) ) . toBe ( stripAnsi ( figures . tick ) ) ;
@@ -34,10 +34,10 @@ describe('Theme', (): void => {
34
34
error : { symbol, badge } ,
35
35
} ) ;
36
36
37
- expect ( stripAnsi ( theme . paint ( text , IndicationType . Default ) ) ) . toBe ( text ) ;
38
- expect ( stripAnsi ( theme . paint ( text , IndicationType . Success ) ) ) . toBe ( text ) ;
39
- expect ( stripAnsi ( theme . paint ( text , IndicationType . Skip ) ) ) . toBe ( text ) ;
40
- expect ( stripAnsi ( theme . paint ( text , IndicationType . Error ) ) ) . toBe ( text ) ;
37
+ expect ( stripAnsi ( theme . paint ( text . input , IndicationType . Default ) ) ) . toBe ( text . output ) ;
38
+ expect ( stripAnsi ( theme . paint ( text . input , IndicationType . Success ) ) ) . toBe ( text . output ) ;
39
+ expect ( stripAnsi ( theme . paint ( text . input , IndicationType . Skip ) ) ) . toBe ( text . output ) ;
40
+ expect ( stripAnsi ( theme . paint ( text . input , IndicationType . Error ) ) ) . toBe ( text . output ) ;
41
41
42
42
expect ( stripAnsi ( theme . symbol ( IndicationType . Default ) ) ) . toBe ( symbol ) ;
43
43
expect ( stripAnsi ( theme . symbol ( IndicationType . Success ) ) ) . toBe ( symbol ) ;
0 commit comments