@@ -29,7 +29,7 @@ describe(FileError.name, () => {
2929 absolutePath : `/path/to/project/path/to/file` ,
3030 projectFolder : '/path/to/project'
3131 } ) ;
32- expect ( error1 . toString ( ) ) . toMatchInlineSnapshot ( `"path/to/file:1:1 - message"` ) ;
32+ expect ( error1 . toString ( ) ) . toMatchInlineSnapshot ( `"path/to/file:1 - message"` ) ;
3333 } ) ;
3434
3535 it ( 'correctly performs Unix-style relative file path formatting' , ( ) => {
@@ -49,7 +49,7 @@ describe(FileError.name, () => {
4949 line : 5
5050 } ) ;
5151 expect ( error2 . getFormattedErrorMessage ( { format : 'Unix' } ) ) . toMatchInlineSnapshot (
52- `"path/to/file:5:1 - message"`
52+ `"path/to/file:5 - message"`
5353 ) ;
5454
5555 const error3 : FileError = new FileError ( 'message' , {
@@ -59,15 +59,15 @@ describe(FileError.name, () => {
5959 column : 12
6060 } ) ;
6161 expect ( error3 . getFormattedErrorMessage ( { format : 'Unix' } ) ) . toMatchInlineSnapshot (
62- `"path/to/file:1:1 - message"`
62+ `"path/to/file:1:12 - message"`
6363 ) ;
6464
6565 const error4 : FileError = new FileError ( 'message' , {
6666 absolutePath : '/path/to/project/path/to/file' ,
6767 projectFolder : '/path/to/project'
6868 } ) ;
6969 expect ( error4 . getFormattedErrorMessage ( { format : 'Unix' } ) ) . toMatchInlineSnapshot (
70- `"path/to/file:1:1 - message"`
70+ `"path/to/file:1 - message"`
7171 ) ;
7272 } ) ;
7373
@@ -93,8 +93,8 @@ describe(FileError.name, () => {
9393 // Because the file path is resolved on disk, the output will vary based on platform.
9494 // Only check that it ends as expected and is an absolute path.
9595 const error2Message : string = error2 . getFormattedErrorMessage ( { format : 'Unix' } ) ;
96- expect ( error2Message ) . toMatch ( / .+ : 5 : 1 - m e s s a g e $ / ) ;
97- const error2Path : string = error2Message . slice ( 0 , error2Message . length - ':5:1 - message' . length ) ;
96+ expect ( error2Message ) . toMatch ( / .+ : 5 - m e s s a g e $ / ) ;
97+ const error2Path : string = error2Message . slice ( 0 , error2Message . length - ':5 - message' . length ) ;
9898 expect ( path . isAbsolute ( error2Path ) ) . toEqual ( true ) ;
9999
100100 const error3 : FileError = new FileError ( 'message' , {
@@ -106,8 +106,8 @@ describe(FileError.name, () => {
106106 // Because the file path is resolved on disk, the output will vary based on platform.
107107 // Only check that it ends as expected and is an absolute path.
108108 const error3Message : string = error3 . getFormattedErrorMessage ( { format : 'Unix' } ) ;
109- expect ( error3Message ) . toMatch ( / .+ : 1 : 1 - m e s s a g e $ / ) ;
110- const error3Path : string = error3Message . slice ( 0 , error3Message . length - ':1:1 - message' . length ) ;
109+ expect ( error3Message ) . toMatch ( / .+ : 1 : 1 2 - m e s s a g e $ / ) ;
110+ const error3Path : string = error3Message . slice ( 0 , error3Message . length - ':1:12 - message' . length ) ;
111111 expect ( path . isAbsolute ( error3Path ) ) . toEqual ( true ) ;
112112
113113 const error4 : FileError = new FileError ( 'message' , {
@@ -117,8 +117,8 @@ describe(FileError.name, () => {
117117 // Because the file path is resolved on disk, the output will vary based on platform.
118118 // Only check that it ends as expected and is an absolute path.
119119 const error4Message : string = error4 . getFormattedErrorMessage ( { format : 'Unix' } ) ;
120- expect ( error4Message ) . toMatch ( / .+ : 1 : 1 - m e s s a g e $ / ) ;
121- const error4Path : string = error4Message . slice ( 0 , error4Message . length - ':1:1 - message' . length ) ;
120+ expect ( error4Message ) . toMatch ( / .+ : 1 - m e s s a g e $ / ) ;
121+ const error4Path : string = error4Message . slice ( 0 , error4Message . length - ':1 - message' . length ) ;
122122 expect ( path . isAbsolute ( error4Path ) ) . toEqual ( true ) ;
123123 } ) ;
124124
@@ -139,7 +139,7 @@ describe(FileError.name, () => {
139139 line : 5
140140 } ) ;
141141 expect ( error2 . getFormattedErrorMessage ( { format : 'VisualStudio' } ) ) . toMatchInlineSnapshot (
142- `"path/to/file(5,1 ) - message"`
142+ `"path/to/file(5) - message"`
143143 ) ;
144144
145145 const error3 : FileError = new FileError ( 'message' , {
@@ -149,15 +149,15 @@ describe(FileError.name, () => {
149149 column : 12
150150 } ) ;
151151 expect ( error3 . getFormattedErrorMessage ( { format : 'VisualStudio' } ) ) . toMatchInlineSnapshot (
152- `"path/to/file(1,1 ) - message"`
152+ `"path/to/file(1,12 ) - message"`
153153 ) ;
154154
155155 const error4 : FileError = new FileError ( 'message' , {
156156 absolutePath : '/path/to/project/path/to/file' ,
157157 projectFolder : '/path/to/project'
158158 } ) ;
159159 expect ( error4 . getFormattedErrorMessage ( { format : 'VisualStudio' } ) ) . toMatchInlineSnapshot (
160- `"path/to/file(1,1 ) - message"`
160+ `"path/to/file(1) - message"`
161161 ) ;
162162 } ) ;
163163
@@ -183,8 +183,8 @@ describe(FileError.name, () => {
183183 // Because the file path is resolved on disk, the output will vary based on platform.
184184 // Only check that it ends as expected and is an absolute path.
185185 const error2Message : string = error2 . getFormattedErrorMessage ( { format : 'VisualStudio' } ) ;
186- expect ( error2Message ) . toMatch ( / .+ \( 5 , 1 \) - m e s s a g e $ / ) ;
187- const error2Path : string = error2Message . slice ( 0 , error2Message . length - '(5,1 ) - message' . length ) ;
186+ expect ( error2Message ) . toMatch ( / .+ \( 5 \) - m e s s a g e $ / ) ;
187+ const error2Path : string = error2Message . slice ( 0 , error2Message . length - '(5) - message' . length ) ;
188188 expect ( path . isAbsolute ( error2Path ) ) . toEqual ( true ) ;
189189
190190 const error3 : FileError = new FileError ( 'message' , {
@@ -196,8 +196,8 @@ describe(FileError.name, () => {
196196 // Because the file path is resolved on disk, the output will vary based on platform.
197197 // Only check that it ends as expected and is an absolute path.
198198 const error3Message : string = error3 . getFormattedErrorMessage ( { format : 'VisualStudio' } ) ;
199- expect ( error3Message ) . toMatch ( / .+ \( 1 , 1 \) - m e s s a g e $ / ) ;
200- const error3Path : string = error3Message . slice ( 0 , error3Message . length - '(1,1 ) - message' . length ) ;
199+ expect ( error3Message ) . toMatch ( / .+ \( 1 , 1 2 \) - m e s s a g e $ / ) ;
200+ const error3Path : string = error3Message . slice ( 0 , error3Message . length - '(1,12 ) - message' . length ) ;
201201 expect ( path . isAbsolute ( error3Path ) ) . toEqual ( true ) ;
202202
203203 const error4 : FileError = new FileError ( 'message' , {
@@ -207,8 +207,8 @@ describe(FileError.name, () => {
207207 // Because the file path is resolved on disk, the output will vary based on platform.
208208 // Only check that it ends as expected and is an absolute path.
209209 const error4Message : string = error4 . getFormattedErrorMessage ( { format : 'VisualStudio' } ) ;
210- expect ( error4Message ) . toMatch ( / .+ \( 1 , 1 \) - m e s s a g e $ / ) ;
211- const error4Path : string = error4Message . slice ( 0 , error4Message . length - '(1,1 ) - message' . length ) ;
210+ expect ( error4Message ) . toMatch ( / .+ \( 1 \) - m e s s a g e $ / ) ;
211+ const error4Path : string = error4Message . slice ( 0 , error4Message . length - '(1) - message' . length ) ;
212212 expect ( path . isAbsolute ( error4Path ) ) . toEqual ( true ) ;
213213 } ) ;
214214} ) ;
0 commit comments