Skip to content

Commit

Permalink
test(build-env): error case for executeProcess
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Sep 14, 2024
1 parent 0c83deb commit d08e53b
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@ describe('startVerdaccioServer', () => {
});

it('should handle errors during process execution', async () => {
const mockError = new Error('Execution failed');
vi.mocked(executeProcess).mockImplementation(() => {
throw mockError;
});
vi.mocked(executeProcess).mockRejectedValue(new Error('Execution failed'));

await expect(
startVerdaccioServer({
Expand Down

0 comments on commit d08e53b

Please sign in to comment.