From a4f851f028bce1ceefc12da32be86b3cfe390d1d Mon Sep 17 00:00:00 2001 From: mektpoy Date: Thu, 22 Oct 2026 22:42:18 +0800 Subject: [PATCH] test(liveshare-protocol): carry malformed share frames without unknown assertions --- .../liveshare-protocol/tests/protocol-utilities.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/experimental/liveshare-protocol/tests/protocol-utilities.spec.ts b/packages/experimental/liveshare-protocol/tests/protocol-utilities.spec.ts index e79a0b45ba..131b93d5a8 100644 --- a/packages/experimental/liveshare-protocol/tests/protocol-utilities.spec.ts +++ b/packages/experimental/liveshare-protocol/tests/protocol-utilities.spec.ts @@ -40,7 +40,7 @@ function spec(): Record { * @param share - Share spec to carry. * @returns The IPC command. */ -function addShare(share: Record): Record { +function addShare(share: unknown): Record { return { type: 'add-share', registrationToken: REGISTRATION, share } } @@ -209,7 +209,7 @@ describe('tunnel worker commands', () => { ] for (const share of invalid) expect(parseTunnelWorkerCommand(addShare(share)), JSON.stringify(share)).toBeUndefined() for (const share of [null, 'share-one', []] as const) { - expect(parseTunnelWorkerCommand(addShare(share as unknown as Record))).toBeUndefined() + expect(parseTunnelWorkerCommand(addShare(share))).toBeUndefined() } const allOptional = {