aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-28 13:30:25 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-28 13:30:25 -0700
commit8dfd3dbdbc38680cdcb7d1b6f72c9709712fb7b7 (patch)
tree6dc1811b88942ce1e0eb3a35248e04fc06623be9
parent63e2d78e76d2af1e584b91f013011db8034fae2e (diff)
downloadbun-8dfd3dbdbc38680cdcb7d1b6f72c9709712fb7b7.tar.gz
bun-8dfd3dbdbc38680cdcb7d1b6f72c9709712fb7b7.tar.zst
bun-8dfd3dbdbc38680cdcb7d1b6f72c9709712fb7b7.zip
Add query string to express integration test
-rw-r--r--test/js/third_party/body-parser/express-body-parser-test.test.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/js/third_party/body-parser/express-body-parser-test.test.ts b/test/js/third_party/body-parser/express-body-parser-test.test.ts
index c99eb81bc..402bf3e1a 100644
--- a/test/js/third_party/body-parser/express-body-parser-test.test.ts
+++ b/test/js/third_party/body-parser/express-body-parser-test.test.ts
@@ -39,13 +39,17 @@ test("httpServer", async () => {
// This throws a TypeError since it uses body-parser.json
app.post("/ping", (request: Request, response: Response) => {
expect(request.body).toEqual({ hello: "world" });
+ expect(request.query).toStrictEqual({
+ hello: "123",
+ hi: "",
+ });
reached = true;
response.status(200).send("POST - pong");
httpServer.close();
});
httpServer.listen(PORT);
- const resp = await fetch(`http://localhost:${PORT}/ping`, {
+ const resp = await fetch(`http://localhost:${PORT}/ping?hello=123&hi`, {
method: "POST",
body: JSON.stringify({ hello: "world" }),
headers: {