import {
  require_supertest
} from "../chunk-X4KDK3QI.mjs";
import {
  describe,
  globalExpect,
  it
} from "../chunk-PVYW3IOG.mjs";
import {
  createServer
} from "../chunk-NVSPMYGX.mjs";
import "../chunk-2F6KNQHU.mjs";
import "../chunk-2C4I33EE.mjs";
import "../chunk-GN6QC5RS.mjs";
import "../chunk-FKHYE7Y6.mjs";
import {
  __toESM
} from "../chunk-2CV3WTQN.mjs";

// src/__tests__/app.test copy.ts
var import_supertest = __toESM(require_supertest());
describe("app", async () => {
  const rpc = createServer({
    fn: {
      // prefix: '/apk2',
    }
  });
  rpc.fn("/a", function(a) {
    return { a };
  });
  const request = (0, import_supertest.default)(rpc.callback());
  it("should first app", async () => {
    const res = await request.get('/api/a?$p=["hello"]');
    globalExpect(res.type).toEqual("application/json");
    globalExpect(res.status).toEqual(200);
    globalExpect(res.body).toEqual({ a: "hello" });
  });
});
