@@ -82,7 +82,7 @@ describe('toFilePath', () => {
8282 const expected = 'C:/path/to/project/node_modules/pkg/file.js'
8383
8484 const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
85- const filePath = toFilePath ( id , root )
85+ const { path : filePath } = toFilePath ( id , root )
8686 processSpy . mockRestore ( )
8787
8888 expect ( slash ( filePath ) ) . toEqual ( expected )
@@ -94,7 +94,7 @@ describe('toFilePath', () => {
9494 const expected = 'C:/path/to/project/node_modules/pkg/file.js'
9595
9696 const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
97- const filePath = toFilePath ( id , root )
97+ const { path : filePath } = toFilePath ( id , root )
9898 processSpy . mockRestore ( )
9999
100100 expect ( slash ( filePath ) ) . toEqual ( expected )
@@ -110,7 +110,7 @@ describe('toFilePath', () => {
110110
111111 const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
112112 const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( true )
113- const filePath = toFilePath ( id , root )
113+ const { path : filePath } = toFilePath ( id , root )
114114 processSpy . mockRestore ( )
115115 existsSpy . mockRestore ( )
116116
@@ -124,7 +124,7 @@ describe('toFilePath', () => {
124124
125125 const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
126126 const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( true )
127- const filePath = toFilePath ( id , root )
127+ const { path : filePath } = toFilePath ( id , root )
128128 processSpy . mockRestore ( )
129129 existsSpy . mockRestore ( )
130130
@@ -138,7 +138,7 @@ describe('toFilePath', () => {
138138
139139 const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
140140 const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( true )
141- const filePath = toFilePath ( id , root )
141+ const { path : filePath } = toFilePath ( id , root )
142142 processSpy . mockRestore ( )
143143 existsSpy . mockRestore ( )
144144
@@ -152,7 +152,7 @@ describe('toFilePath', () => {
152152
153153 const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
154154 const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( true )
155- const filePath = toFilePath ( id , root )
155+ const { path : filePath } = toFilePath ( id , root )
156156 processSpy . mockRestore ( )
157157 existsSpy . mockRestore ( )
158158
@@ -166,7 +166,7 @@ describe('toFilePath', () => {
166166
167167 const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
168168 const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( true )
169- const filePath = toFilePath ( id , root )
169+ const { path : filePath } = toFilePath ( id , root )
170170 processSpy . mockRestore ( )
171171 existsSpy . mockRestore ( )
172172
@@ -179,7 +179,7 @@ describe('toFilePath', () => {
179179
180180 const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
181181 const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( false )
182- const filePath = toFilePath ( id , root )
182+ const { path : filePath } = toFilePath ( id , root )
183183 processSpy . mockRestore ( )
184184 existsSpy . mockRestore ( )
185185
0 commit comments