From be3e1a4590095f53367b959388b961b7fe099baa Mon Sep 17 00:00:00 2001 From: Douglas Winter <1329194+winterdouglas@users.noreply.github.com> Date: Wed, 13 May 2026 11:31:58 +0200 Subject: [PATCH 1/3] fix: incorrect mock paths --- packages/react-native-audio-api/mock/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-native-audio-api/mock/package.json b/packages/react-native-audio-api/mock/package.json index d31d1d373..0efcc1965 100644 --- a/packages/react-native-audio-api/mock/package.json +++ b/packages/react-native-audio-api/mock/package.json @@ -1,6 +1,6 @@ { - "main": "../../lib/module/mock/index", - "module": "../../lib/module/mock/index", - "react-native": "../../src/mock/index", - "types": "../../lib/typescript/mock/index.d.ts" + "main": "../lib/module/mock/index", + "module": "../lib/module/mock/index", + "react-native": "../src/mock/index", + "types": "../lib/typescript/mock/index.d.ts" } From 4d954fa54d7fcff84b2affcafbd353f4d279ba68 Mon Sep 17 00:00:00 2001 From: michal Date: Wed, 13 May 2026 12:44:10 +0200 Subject: [PATCH 2/3] test: better imports in jest tests --- packages/react-native-audio-api/tests/integration.test.ts | 3 ++- packages/react-native-audio-api/tests/mock.test.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-native-audio-api/tests/integration.test.ts b/packages/react-native-audio-api/tests/integration.test.ts index a6aeffbe4..e130eb1eb 100644 --- a/packages/react-native-audio-api/tests/integration.test.ts +++ b/packages/react-native-audio-api/tests/integration.test.ts @@ -1,6 +1,6 @@ /* eslint-disable */ -import * as MockAPI from '../src/mock'; +import * as MockAPI from 'react-native-audio-api/mock'; describe('Mock Integration Tests', () => { describe('Audio Graph Creation', () => { @@ -86,6 +86,7 @@ describe('Mock Integration Tests', () => { // Stop recording const stopResult = recorder.stop(); expect(stopResult.status).toBe('success'); + // @ts-ignore - paths is not seen as the correct type expect(stopResult.paths?.length).toBeGreaterThan(0); expect(recorder.isRecording()).toBe(false); }); diff --git a/packages/react-native-audio-api/tests/mock.test.ts b/packages/react-native-audio-api/tests/mock.test.ts index 355b2301b..48e868c78 100644 --- a/packages/react-native-audio-api/tests/mock.test.ts +++ b/packages/react-native-audio-api/tests/mock.test.ts @@ -1,6 +1,6 @@ /* eslint-disable */ -import * as MockAPI from '../src/mock'; +import * as MockAPI from 'react-native-audio-api/mock'; describe('React Native Audio API Mocks', () => { describe('AudioContext', () => { @@ -283,6 +283,7 @@ describe('React Native Audio API Mocks', () => { const stopResult = recorder.stop(); expect(stopResult.status).toBe('success'); + // @ts-ignore - paths is not seen as the correct type expect(stopResult.paths?.length).toBeGreaterThan(0); expect(recorder.isRecording()).toBe(false); }); From 05f6663e96342136d756e314bb29e29182861ea9 Mon Sep 17 00:00:00 2001 From: michal Date: Wed, 13 May 2026 12:53:28 +0200 Subject: [PATCH 3/3] fix: tests --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index de8e8d006..9a2cf7143 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,4 +29,4 @@ jobs: - name: Run JS integration tests working-directory: packages/react-native-audio-api - run: yarn test:js + run: yarn build && yarn test:js