Skip to content

Commit 676f13d

Browse files
committed
wip: add invalid route test
1 parent ee9f90b commit 676f13d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/unit/proxy.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,14 @@ describe("proxy", () => {
119119
expect(resp.status).toBe(400)
120120
expect(resp.statusText).toMatch("Bad Request")
121121
})
122+
123+
it("should handle invalid routes", async () => {
124+
e.post("/wsup", (req, res) => {
125+
res.json(req.body)
126+
})
127+
codeServer = await integration.setup(["--auth=none"], "")
128+
const resp = await codeServer.fetch(`${proxyPath}/hello`)
129+
expect(resp.status).toBe(404)
130+
expect(resp.statusText).toMatch("Not Found")
131+
})
122132
})

0 commit comments

Comments
 (0)