diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit/command_test.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/tests/unit/command_test.ts b/cli/tests/unit/command_test.ts index 2e73869a9..ce3af08fb 100644 --- a/cli/tests/unit/command_test.ts +++ b/cli/tests/unit/command_test.ts @@ -885,3 +885,19 @@ Deno.test( ); }, ); + +Deno.test( + "process that fails to spawn, prints its name in error", + async () => { + assertThrows( + () => new Deno.Command("doesntexist").outputSync(), + Error, + "Failed to spawn: doesntexist", + ); + await assertRejects( + async () => await new Deno.Command("doesntexist").output(), + Error, + "Failed to spawn: doesntexist", + ); + }, +); |