Jest mock middleware response

I am trying to mock a middleware response, and i am trying to use jest.spyOn() but can't seem to get it working

My controller.ts has the following

import someMiddleware from '../someMiddleware;
....
....
this.route.post('/getData', someMiddleware, setValue)

In someMiddlware.ts

//making a fetch call based on data in req.body
.....
const data = await fetchData(url, data)
next()
.....

In my test file controller.test.ts

  
  describe('Test Data', () => {
    beforeEach(() => {
      someMiddlewareSpyOn = jest.spyOn(meddelware, "someMiddleware");
    });

    afterEach(() => {
      jest.resetModules();
      jest.resetAllMocks();
    });

    it('response status should be a 200', async () => {

      someMiddlewareSpyOn.mockResolvedValue({data:[].....});

      const res = await request(app.getServer())
        .post('/getData');
      expect(res.status).toBe(200);
    })
  });

The above does not work, looking for assistance on how to do this.