From 4c6b960da34e98df5f43cf5e028fc98755fe31c6 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 9 Oct 2025 11:00:45 +0200 Subject: [PATCH] fix: use correct TestEachFunction --- src/livekit/MatrixAudioRenderer.test.tsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/livekit/MatrixAudioRenderer.test.tsx b/src/livekit/MatrixAudioRenderer.test.tsx index b78b274d..83b3f73a 100644 --- a/src/livekit/MatrixAudioRenderer.test.tsx +++ b/src/livekit/MatrixAudioRenderer.test.tsx @@ -152,15 +152,14 @@ const TEST_CASES: { }, ]; -TEST_CASES.forEach( - ({ rtcUsers, livekitParticipantIdentities, expectedAudioTracks }, index) => { - it(`should render sound test cases #${index + 1}`, () => { - const { queryAllByTestId } = renderTestComponent( - rtcUsers, - livekitParticipantIdentities, - ); - expect(queryAllByTestId("audio")).toHaveLength(expectedAudioTracks); - }); +it.each(TEST_CASES)( + `should render sound test cases %s`, + ({ rtcUsers, livekitParticipantIdentities, expectedAudioTracks }) => { + const { queryAllByTestId } = renderTestComponent( + rtcUsers, + livekitParticipantIdentities, + ); + expect(queryAllByTestId("audio")).toHaveLength(expectedAudioTracks); }, );