We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d928a0 commit ee9f90bCopy full SHA for ee9f90b
test/unit/proxy.test.ts
@@ -102,4 +102,21 @@ describe("proxy", () => {
102
expect(resp.status).toBe(200)
103
expect(await resp.json()).toBe("coder is the best")
104
})
105
+
106
+ it("should handle bad requests", async () => {
107
+ e.use(bodyParser.json({ strict: false }))
108
+ e.post("/wsup", (req, res) => {
109
+ res.json(req.body)
110
+ })
111
+ codeServer = await integration.setup(["--auth=none"], "")
112
+ const resp = await codeServer.fetch(proxyPath, {
113
+ method: "post",
114
+ body: "coder is the best",
115
+ headers: {
116
+ "Content-Type": "application/json",
117
+ },
118
119
+ expect(resp.status).toBe(400)
120
+ expect(resp.statusText).toMatch("Bad Request")
121
122
0 commit comments