-
Notifications
You must be signed in to change notification settings - Fork 555
Closed
Labels
triageIssues to be categorized by the teamIssues to be categorized by the team
Description
🐛 Current behavior
Since v4.90.0, mocking react-instantsearch results in all the export being undefined.
🔍 Steps to reproduce
jest.mock('react-instantsearch');
import { useInstantSearch } from 'react-instantsearch';
console.log(useInstantSearch); // undefinedThis works, but it's not ideal:
jest.mock('react-instantsearch', () => ({
...jest.requireActual('react-instantsearch'),
useInstantSearch: jest.fn(),
}));Live reproduction
N/A
💭 Expected behavior
We should be able to mock 'react-instantsearch' without having to use weird hacks.
Package version
react-instantsearch v4.90.0
Operating system
No response
Browser
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
triageIssues to be categorized by the teamIssues to be categorized by the team