Skip to content

Commit d4f5440

Browse files
committed
test(proxy): remove external request to speedup
1 parent f5a5d6b commit d4f5440

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/proxy.test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,21 @@ describe("", () => {
4747
});
4848

4949
describe("sendProxy", () => {
50-
it("can sendProxy", async () => {
50+
it("works", async () => {
51+
app.use(
52+
"/hello",
53+
eventHandler(() => "hello")
54+
);
5155
app.use(
5256
"/",
5357
eventHandler((event) => {
54-
return sendProxy(event, "https://example.com", { fetch });
58+
return sendProxy(event, url + "/hello", { fetch });
5559
})
5660
);
5761

5862
const result = await request.get("/");
5963

60-
expect(result.text).toContain(
61-
'a href="https://www.iana.org/domains/example">More information...</a>'
62-
);
64+
expect(result.text).toBe("hello");
6365
});
6466
});
6567

0 commit comments

Comments
 (0)