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 676f13d commit e4fecc9Copy full SHA for e4fecc9
test/unit/proxy.test.ts
@@ -129,4 +129,21 @@ describe("proxy", () => {
129
expect(resp.status).toBe(404)
130
expect(resp.statusText).toMatch("Not Found")
131
})
132
+
133
+ it("should handle errors", async () => {
134
+ e.use(bodyParser.json({ strict: false }))
135
+ e.post("/wsup", (req, res) => {
136
+ throw new Error("BROKEN")
137
+ })
138
+ codeServer = await integration.setup(["--auth=none"], "")
139
+ const resp = await codeServer.fetch(proxyPath, {
140
+ method: "post",
141
+ body: JSON.stringify("coder is the best"),
142
+ headers: {
143
+ "Content-Type": "application/json",
144
+ },
145
146
+ expect(resp.status).toBe(500)
147
+ expect(resp.statusText).toMatch("Internal Server Error")
148
149
0 commit comments