TypeError: Cannot read properties of undefined (reading 'hander')

问题遇到的现象和发生背景

就是不太懂这个test已经是对象了。hander是方法但是调用不了 一调用就报错

const http = require("http");
const url = require("url");
let routers = [];
class Application {
  get(path, hander) {
    routers.push({
      path,
      method: "get",
      hander,
    });
  }
  listen() {
    const server = http.createServer(function (req, res) {
      const { pathname } = url.parse(req.url); //在路径中解析出来pathname
      // console.log(pathname);
      // console.log(req.method.toLowerCase());
      //在路由表routers通过pathname,找到回调,然后执行
      var test = routers.find((v) => {
        // console.log(v);
        // console.log(v.path);
        // console.log(v.method);
           return v.path == pathname && req.method.toLowerCase() == v.method;
      });
       console.log(test);
      // console.log(test.hander);
      // console.log(test.path);
      // var re = test.hander(req, res)
      // console.log(re);
        return test.hander(req,res)
      
    });
    //在Application原型上添加listen方法匹配路径,执行对应的hander
    server.listen(...arguments);
  }
}
module.exports = function () {
  return new Application();

问题相关代码,请勿粘贴截图
运行结果及报错内容

img

我的解答思路和尝试过的方法
我想要达到的结果

你的函数hander在哪定义呢
就是这句吗
routers.push({
path,
method: "get",
hander,
});
可是它的实现在哪呢,调用它执行什么代码呢