From d23c9d5a475fa3cb45092b6bd1ba910a9bb904ee Mon Sep 17 00:00:00 2001 From: Max Stoumen Date: Fri, 16 Jun 2023 11:39:32 -0700 Subject: [PATCH] fix unit tests --- tests/extension/runner.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/extension/runner.test.ts b/tests/extension/runner.test.ts index 961fef54e..c87150b8e 100644 --- a/tests/extension/runner.test.ts +++ b/tests/extension/runner.test.ts @@ -551,8 +551,12 @@ suite('grpc Runner', () => { test('grpc program failure gives info message', async () => { const { duplex } = await createNewSession() - duplex._onError.fire(new RpcError('unable to infer file program')) + duplex._onError.fire(new RpcError('invalid LanguageId')) + expect(window.showErrorMessage).toBeCalledTimes(1) + + vi.mocked(window.showErrorMessage).mockClear() + duplex._onError.fire(new RpcError('invalid ProgramName')) expect(window.showErrorMessage).toBeCalledTimes(1) }) })