Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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: (...
Hana G's user avatar
  • 1
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 --...
naffers's user avatar
  • 71