@@ -82,7 +82,7 @@ describe('toFilePath', () => {
82
82
const expected = 'C:/path/to/project/node_modules/pkg/file.js'
83
83
84
84
const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
85
- const filePath = toFilePath ( id , root )
85
+ const { path : filePath } = toFilePath ( id , root )
86
86
processSpy . mockRestore ( )
87
87
88
88
expect ( slash ( filePath ) ) . toEqual ( expected )
@@ -94,7 +94,7 @@ describe('toFilePath', () => {
94
94
const expected = 'C:/path/to/project/node_modules/pkg/file.js'
95
95
96
96
const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
97
- const filePath = toFilePath ( id , root )
97
+ const { path : filePath } = toFilePath ( id , root )
98
98
processSpy . mockRestore ( )
99
99
100
100
expect ( slash ( filePath ) ) . toEqual ( expected )
@@ -110,7 +110,7 @@ describe('toFilePath', () => {
110
110
111
111
const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
112
112
const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( true )
113
- const filePath = toFilePath ( id , root )
113
+ const { path : filePath } = toFilePath ( id , root )
114
114
processSpy . mockRestore ( )
115
115
existsSpy . mockRestore ( )
116
116
@@ -124,7 +124,7 @@ describe('toFilePath', () => {
124
124
125
125
const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
126
126
const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( true )
127
- const filePath = toFilePath ( id , root )
127
+ const { path : filePath } = toFilePath ( id , root )
128
128
processSpy . mockRestore ( )
129
129
existsSpy . mockRestore ( )
130
130
@@ -138,7 +138,7 @@ describe('toFilePath', () => {
138
138
139
139
const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
140
140
const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( true )
141
- const filePath = toFilePath ( id , root )
141
+ const { path : filePath } = toFilePath ( id , root )
142
142
processSpy . mockRestore ( )
143
143
existsSpy . mockRestore ( )
144
144
@@ -152,7 +152,7 @@ describe('toFilePath', () => {
152
152
153
153
const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
154
154
const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( true )
155
- const filePath = toFilePath ( id , root )
155
+ const { path : filePath } = toFilePath ( id , root )
156
156
processSpy . mockRestore ( )
157
157
existsSpy . mockRestore ( )
158
158
@@ -166,7 +166,7 @@ describe('toFilePath', () => {
166
166
167
167
const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
168
168
const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( true )
169
- const filePath = toFilePath ( id , root )
169
+ const { path : filePath } = toFilePath ( id , root )
170
170
processSpy . mockRestore ( )
171
171
existsSpy . mockRestore ( )
172
172
@@ -179,7 +179,7 @@ describe('toFilePath', () => {
179
179
180
180
const processSpy = vi . spyOn ( process , 'cwd' ) . mockReturnValue ( root )
181
181
const existsSpy = vi . mocked ( existsSync ) . mockReturnValue ( false )
182
- const filePath = toFilePath ( id , root )
182
+ const { path : filePath } = toFilePath ( id , root )
183
183
processSpy . mockRestore ( )
184
184
existsSpy . mockRestore ( )
185
185
0 commit comments