deno.land / x / opine@2.3.4 / test / units / res.get.test.ts

res.get.test.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { opine } from "../../mod.ts";import { superdeno } from "../deps.ts";import { describe, it } from "../utils.ts";
describe("res", function () { describe(".get(field)", function () { it("should get the response header field", function (done) { const app = opine();
app.use(function (req, res) { res.set("Content-Type", "text/x-foo"); res.send(res.get("Content-Type")); });
superdeno(app).get("/").expect(200, /text\/x\-foo/, done); }); });});
opine

Version Info

Tagged at
2 years ago