deno.land / x / alosaur@v1.1.1 / e2e / di.test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { assertEquals } from "../src/deps_test.ts";import { killServer, startServer } from "./test.utils.ts";const { test } = Deno;
test({ name: "[http] DI server should be run", async fn(t): Promise<void> { const process = await startServer("./examples/di/app.ts"); const baseUrl = "http://localhost:8000";
try { await t.step("/home/text?name=alosaur", async () => { let response = await fetch(baseUrl + "/home/text?name=alosaur"); let text = await response.text(); assertEquals(response.status, 200); assertEquals(text, "Hey! My name is Foo, alosaur"); }); } finally { killServer(process); } },});
alosaur

Version Info

Tagged at
2 months ago