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
Ok sorry, I've just found the issue related to your PR. I think this is an issue related to the default export? Have you tried mocking the packge method without the default export and have you tried to mock the import instead? I think that would be a better method.
import * as nestjsTypeormPaginate from 'nestjs-typeorm-paginate';
jest.spyOn(nestjsTypeormPaginate, 'paginate').mockImplementationOnce(() => Promise.resolve({items: [], meta: {}}))
Actual Behaviour
TypeError: Cannot redefine property: paginate
at Function.defineProperty ()
Expected Behaviour
{items: [], meta: {}}
The text was updated successfully, but these errors were encountered: