Skip to content

Commit

Permalink
fix: return mock path only when mocked (#2619)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored Jan 6, 2023
1 parent aeba492 commit f8ac209
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/vitest/src/runtime/mocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@ export class VitestMocker {
return result
}
if (typeof mock === 'string' && !callstack.includes(mock))
url = mock
return url
return mock
}

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

0 comments on commit f8ac209

Please sign in to comment.