From d08e53bec1f0c8f5e803b07ec7d1dca06f255572 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 14 Sep 2024 23:43:49 +0300 Subject: [PATCH] test(build-env): error case for executeProcess --- .../src/executors/bootstrap/verdaccio-registry.unit-test.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tooling/build-env/src/executors/bootstrap/verdaccio-registry.unit-test.ts b/tooling/build-env/src/executors/bootstrap/verdaccio-registry.unit-test.ts index 6cbbca32..bc8a0f65 100644 --- a/tooling/build-env/src/executors/bootstrap/verdaccio-registry.unit-test.ts +++ b/tooling/build-env/src/executors/bootstrap/verdaccio-registry.unit-test.ts @@ -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({