@@ -20,8 +20,14 @@ test('PrintError.opening - should generate correct opening part of error stack t
2020 const errorMessage = 'Test error message' ;
2121 const printError = new PrintError ( errorMessage ) ;
2222 const opening = printError [ 'opening' ] ( ) ;
23- const expectedPrefix = printError [ 'highlight' ] ( 'red' , printError [ 'divide' ] ( process . stdout ?. columns - 20 ) ) ;
24- const expectedSuffix = printError [ 'highlight' ] ( 'red' , printError [ 'divide' ] ( process . stdout ?. columns - 20 ) ) ;
23+ const expectedPrefix = printError [ 'highlight' ] (
24+ 'red' ,
25+ printError [ 'divide' ] ( process . stdout ?. columns - 20 ) ,
26+ ) ;
27+ const expectedSuffix = printError [ 'highlight' ] (
28+ 'red' ,
29+ printError [ 'divide' ] ( process . stdout ?. columns - 20 ) ,
30+ ) ;
2531 expect ( opening ) . toContain ( errorMessage ) ;
2632 expect ( opening ) . toContain ( expectedPrefix ) ;
2733 expect ( opening ) . toContain ( expectedSuffix ) ;
@@ -31,8 +37,14 @@ test('PrintError.closing - should generate correct closing part of error stack t
3137 const errorMessage = 'Test error message' ;
3238 const printError = new PrintError ( errorMessage ) ;
3339 const closing = printError [ 'closing' ] ( ) ;
34- const expectedPrefix = printError [ 'highlight' ] ( 'red' , printError [ 'divide' ] ( process . stdout ?. columns - 21 ) ) ;
35- const expectedSuffix = printError [ 'highlight' ] ( 'red' , printError [ 'divide' ] ( 1 ) ) ;
40+ const expectedPrefix = printError [ 'highlight' ] (
41+ 'red' ,
42+ printError [ 'divide' ] ( process . stdout ?. columns - 21 ) ,
43+ ) ;
44+ const expectedSuffix = printError [ 'highlight' ] (
45+ 'red' ,
46+ printError [ 'divide' ] ( 1 ) ,
47+ ) ;
3648 expect ( closing ) . toContain ( printError . constructor . name ) ;
3749 expect ( closing ) . toContain ( expectedPrefix ) ;
3850 expect ( closing ) . toContain ( expectedSuffix ) ;
@@ -42,13 +54,14 @@ test('PrintError.print - should generate correct trace information', () => {
4254 const printError = new PrintError ( '' ) ;
4355 const track : TraceOption [ ] = [
4456 {
45- original : 'at exampleFunction (/path/to/example-package/example.js:10:1)' ,
57+ original :
58+ 'at exampleFunction (/path/to/example-package/example.js:10:1)' ,
4659 file : 'example.js' ,
4760 line : 10 ,
4861 col : 1 ,
4962 name : 'exampleFunction' ,
5063 packageName : 'example-package' ,
51- address : '/path/to/example-package/example.js'
64+ address : '/path/to/example-package/example.js' ,
5265 } ,
5366 {
5467 original : 'at anotherFunction (/path/to/current/another.js:20:2)' ,
@@ -57,8 +70,8 @@ test('PrintError.print - should generate correct trace information', () => {
5770 col : 2 ,
5871 name : 'anotherFunction' ,
5972 packageName : '[current]' ,
60- address : '/path/to/current/another.js'
61- }
73+ address : '/path/to/current/another.js' ,
74+ } ,
6275 ] ;
6376
6477 const expected =
0 commit comments