import {Polly} from "@pollyjs/core"; 

const polly = new Polly("<Recording Name>");
const { server } = polly;

// Events & Middleware
server
  .any()
  .on("request", (req, res) => {
    req.headers["X-Auth-Token"] = "abc123";
  });
//
// Intercept requests
server.get("/sail-web/parameterSetting/selectServiceTel").intercept((req, res) => {
  res.status(200).json({"code":10000,"msg":"操作成功","data":{"id":11,"phone":"gyf0851-85637098"}});
});

// Passthrough requests
server.get("/coverage").passthrough();