deno.land / x / opine@2.3.4 / examples / cors / index.test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { superdeno } from "../../test/deps.ts";import { describe, it } from "../../test/utils.ts";import { app } from "./index.ts";
describe("cors", () => { it("should respond with 'Hello Deno!' on the root path", async () => { await superdeno(app) .get("/") .expect(200, "Hello Deno!"); });
it("should apply CORS headers to the response", async () => { await superdeno(app) .get("/") .expect("Access-Control-Allow-Origin", "*"); });});
opine

Version Info

Tagged at
2 years ago