Skip to content
Discussion options

You must be logged in to vote

Managed to solve this with some jest mocks to override how nextjs is requiring it's webpackified modules:

jest.mock('../.next/server/pages/_document', () =>
  require('../src/pages/_document')
);
jest.mock('../.next/server/pages/_app', () => require('../src/pages/_app'));
jest.mock('../.next/server/pages/index', () => require('../src/pages/index'));

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Mikeysauce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant