Formatting
This commit is contained in:
@@ -73,11 +73,19 @@ describe("command handler contracts", () => {
|
||||
const { io } = createMockIO();
|
||||
|
||||
await expect(
|
||||
handleResourceCommand(createCommandDeps(fakeApp, io), ["does-not-exist"], {}),
|
||||
handleResourceCommand(
|
||||
createCommandDeps(fakeApp, io),
|
||||
["does-not-exist"],
|
||||
{},
|
||||
),
|
||||
).rejects.toThrow(CommandError);
|
||||
|
||||
try {
|
||||
await handleResourceCommand(createCommandDeps(fakeApp, io), ["does-not-exist"], {});
|
||||
await handleResourceCommand(
|
||||
createCommandDeps(fakeApp, io),
|
||||
["does-not-exist"],
|
||||
{},
|
||||
);
|
||||
} catch (error) {
|
||||
expect(error).toBeInstanceOf(CommandError);
|
||||
expect((error as CommandError).event).toBe("resource.subcommand.unknown");
|
||||
|
||||
Reference in New Issue
Block a user