All Questions
2 questions
0
votes
0
answers
412
views
mocking zustand store in next js with testing library and jest
component-store.js:
import { create } from 'zustand';
export const componentStore = create((set) => ({
ITEMS_PER_PAGE: 5,
currentNoOfItems: 5,
totalItem: '',
showMoreItems: (...
0
votes
1
answer
1k
views
Unable to mock an exported named function with jest / react-testing-library whilst rendering a nextjs page
I've been trying to mock a named imported function in a NextJS page but all attempts I've gleaned from various sites have failed so far.
I've tried to reproduce this using create-next-app with --...