Skip to content

Fix entrypoint pointing to an invalid index.js that does not exist causing issues with jest for example#128

Open
sync wants to merge 1 commit into
stallion-tech:mainfrom
sync:fix-jest
Open

Fix entrypoint pointing to an invalid index.js that does not exist causing issues with jest for example#128
sync wants to merge 1 commit into
stallion-tech:mainfrom
sync:fix-jest

Conversation

@sync

@sync sync commented Jul 15, 2026

Copy link
Copy Markdown

Update the package entry point so that node compatible resolvers and test runners (like jest) can locate the published js module correctly. This keeps Metro behaviour unchanged while making the package usable by Jest and other tooling that relies on the standard main field.

You can reproduce this by doing:

jest.mock("react-native-stallion", () => ({
	__esModule: true,
	ACTIVE_RELEASE_HASH: null,
	withStallion: (Component) => Component,
	useStallionModal: () => ({ showModal: jest.fn() }),
}));

And will experience the following error: Cannot find module 'react-native-stallion' from...

Causing issues with jest for example because the entrypoint is invalid
@sherlock-stallion

sherlock-stallion commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Please fix branch name

all release branch names should start with (r/release.*) use r/release.fix-jest for example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants