Charly Astrada

Results 3 comments of Charly Astrada

I am having a very similar issue, but in my case I am trying to mock the isAuth and call next() as a mock implementation, but I don't think it's...

@riggedCoinflip have you tried mocking the import? https://stackoverflow.com/questions/60722281/testing-an-express-middleware-with-jest? ```javascript jest.mock("pathToYourAuthModule", () => { return { isAuth: jest.fn((req,res,next) => next()), //and/or you can set your req.user.isAuth to true }; }); ```...

Same issue for me. Using Sketch version 52.3