Jest giving Timeout error on PhPUnserialize unserialize method

I am using Jest as Test runner in express code base . I am receiving an error when running one test case . Its throwing error at PHPUnserialize line . I am not understanding how to solve this issue as I have tried modifying timeouts but no of no avail.

Test Case

  it("Returns data from cache", async () => {
    //perform the request to the api which will now be intercepted by nock
    const res = await request(app).get(
      "/drupal/en/v1/api/article/2?_format=json"
    );
    //assert that the mocked response is returned
    expect(res.status).toEqual(200);
  });

Error

  at Console.log (node_modules/winston/lib/winston/transports/console.js:79:23)

    console.error
      Error: Uncaught [TypeError: PHPUnserialize.unserialize is not a function]
          at reportException (/Users/anandabhishe/gitlab/wellness/wellbeing-proxy/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:62:24)
          at Timeout.task [as _onTimeout] (/Users/anandabhishe/gitlab/wellness/wellbeing-proxy/node_modules/jsdom/lib/jsdom/browser/Window.js:396:9)
          at listOnTimeout (internal/timers.js:554:17)
          at processTimers (internal/timers.js:497:7) TypeError: PHPUnserialize.unserialize is not a function
          at apply (/Users/anandabhishe/gitlab/wellness/wellbeing-proxy/routes/drupal.js:39:37)
          at tryCatcher (/Users/anandabhishe/gitlab/wellness/wellbeing-proxy/node_modules/standard-as-callback/built/utils.js:11:23)
          at /Users/anandabhishe/gitlab/wellness/wellbeing-proxy/node_modules/standard-as-callback/built/index.js:19:23
          at processTicksAndRejections (internal/process/task_queues.js:93:5)

Piece of code under test

function cache(req, res, next) {
  const url = req.url;
  var pos = url.indexOf("?");
  var type = req.private == true ? "?type=private" : "?type=public";
  var cachekey = cacheKeyPrefix.concat(url.slice(4, pos)).concat(type);
  drupalLogger.info("<<<< Cache Key >>>>", cachekey);
  client.hgetall(cachekey, (err, data) => {
    if (err) {
      if (err instanceof Redis.ReplyError) {
        drupalLogger.info("<<<< Redis Reply Error >>>>", err.message);
        res.status(500).json({
          error: err.name,
          error_description: err.message,
        });
        return;
      } else {
        drupalLogger.info("<<<< Redis Connection Error >>>>", err.message);
        req.redisErr = true;
        return next(err);
      }
    }
    if (Object.keys(data).length !== 0 && data !== null) {
      drupalLogger.info("<<<< Found in Cache >>>>", typeof data);
      var datasend = PHPUnserialize.unserialize('a:0:{}');
      res.send(datasend);
    } else {
      drupalLogger.info("<<<< Not Found in Cache >>>>");
      next();
    }
  });
}