jest TypeError: (0 , _computedWithAutoFillData.computedOffsetXValueWithAutoFillData) is not a function #649
-
Hey all! I am having difficulty trying to run a test on my Carousel component. I checked the documentation, and I believe my env is well setup but when I try to run my test, I got this error:
this is my test: const data = ['Slide 1', 'Slide 2', 'Slide 3', 'Slide 4', 'Slide 5', 'Slide 6'];
const renderItem: CarouselRenderItem<string> = ({ item }) => (
<Body>{item}</Body>
);
describe('Carousel', () => {
beforeEach(() => {
jest.useFakeTimers();
jest.clearAllMocks();
});
it('renders properly', async () => {
render(<Carousel data={data} renderItem={renderItem} />);
fireEvent(screen.getByTestId('container'), 'layout', {
nativeEvent: { layout: { width: 200, height: 200 } },
});
jest.advanceTimersByTime(1000);
const card1 = await screen.findByRole('label', { name: data[0] });
expect(card1).toBeDefined();
});
}); Has anybody faced this issue before? Any ideas? Dependency
|
Beta Was this translation helpful? Give feedback.
Answered by
andresouza-maple
Jul 25, 2024
Replies: 1 comment
-
This issue occurs only on the new version, |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
andresouza-maple
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue occurs only on the new version,
4.0.0
. I opened an issue for it at #651.