Skip to content

Commit f8ac209

Browse files
authoredJan 6, 2023
fix: return mock path only when mocked (#2619)
1 parent aeba492 commit f8ac209

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎packages/vitest/src/runtime/mocker.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,7 @@ export class VitestMocker {
377377
return result
378378
}
379379
if (typeof mock === 'string' && !callstack.includes(mock))
380-
url = mock
381-
return url
380+
return mock
382381
}
383382

384383
public queueMock(id: string, importer: string, factory?: MockFactory) {

0 commit comments

Comments
 (0)
Please sign in to comment.