-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
/
utils.test.ts.snap
53 lines (41 loc) · 1.71 KB
/
utils.test.ts.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`printDisplayName should correctly print the displayName when color and name are valid values 1`] = `"</><inverse><green> hello </></></>"`;
exports[`printDisplayName should default displayName color to white when color is not a valid value 1`] = `"</><inverse><white> hello </></></>"`;
exports[`printDisplayName should default displayName color to white when displayName is a string 1`] = `"</><inverse><white> hello </></></>"`;
exports[`trimAndFormatPath() does not trim anything 1`] = `"<dim>1234567890/1234567890/</><bold>1234.js</>"`;
exports[`trimAndFormatPath() split at the path.sep index 1`] = `"<dim>.../</><bold>1234.js</>"`;
exports[`trimAndFormatPath() trims dirname (longer line width) 1`] = `"<dim>...890/1234567890/</><bold>1234.js</>"`;
exports[`trimAndFormatPath() trims dirname 1`] = `"<dim>...234567890/</><bold>1234.js</>"`;
exports[`trimAndFormatPath() trims dirname and basename 1`] = `"<bold>...1234.js</>"`;
exports[`wrapAnsiString() returns the string unaltered if given a terminal width of zero 1`] = `"This string shouldn't cause you any trouble"`;
exports[`wrapAnsiString() returns the string unaltered if given a terminal width of zero 2`] = `"This string shouldn't cause you any trouble"`;
exports[`wrapAnsiString() wraps a long string containing ansi chars 1`] = `
"abcde <red><bold>red-
bold</></> 12344
56<dim>bcd</> 123t
tttttththt
hththththt
hththththt
hththththt
hthththtet
etetetette
tetetetete
tetete<bold>stnh
snthsnth</>ss
ot"
`;
exports[`wrapAnsiString() wraps a long string containing ansi chars 2`] = `
"abcde red-
bold 12344
56bcd 123t
tttttththt
hththththt
hththththt
hththththt
hthththtet
etetetette
tetetetete
tetetestnh
snthsnthss
ot"
`;