You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing the test cases for API files that are using Next.js. I have tried many ways to achieve it.
I need some help as I am not able to get the coverage of the file at all.
the error I am facing are:- Received promise rejected instead of resolved Rejected to value: [TypeError: Cannot read property 'param' of undefined] TypeError: Cannot destructure property 'serverRuntimeConfig' of '(0 , _config.default)(...)' as it is undefined.
I am really stuck need some help to get the coverage of this file and solve the errors.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am writing the test cases for API files that are using Next.js. I have tried many ways to achieve it.
I need some help as I am not able to get the coverage of the file at all.
apiFile.js
TestFile.js
the error I am facing are:-
Received promise rejected instead of resolved Rejected to value: [TypeError: Cannot read property 'param' of undefined]
TypeError: Cannot destructure property 'serverRuntimeConfig' of '(0 , _config.default)(...)' as it is undefined.
I am really stuck need some help to get the coverage of this file and solve the errors.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions