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 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" } 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); });