From d4f5440de946216db03d543b4ad1c8010a9ce4dd Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 1 Aug 2023 13:17:30 +0200 Subject: [PATCH] test(proxy): remove external request to speedup --- test/proxy.test.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/proxy.test.ts b/test/proxy.test.ts index 0c67e97b..d683a984 100644 --- a/test/proxy.test.ts +++ b/test/proxy.test.ts @@ -47,19 +47,21 @@ describe("", () => { }); describe("sendProxy", () => { - it("can sendProxy", async () => { + it("works", async () => { + app.use( + "/hello", + eventHandler(() => "hello") + ); app.use( "/", eventHandler((event) => { - return sendProxy(event, "https://example.com", { fetch }); + return sendProxy(event, url + "/hello", { fetch }); }) ); const result = await request.get("/"); - expect(result.text).toContain( - 'a href="https://www.iana.org/domains/example">More information...' - ); + expect(result.text).toBe("hello"); }); });