Skip to main content
Module

x/alosaur/e2e/global-error/app.test.ts

Alosaur - Deno web framework with many decorators
Very Popular
Go to Latest
File
import { assertEquals } from "../../src/deps_test.ts";import { killServer, startServer } from "../test.utils.ts";const { test } = Deno;
/** * Test cases */test({ name: "[http] global error server should response 500", async fn(): Promise<void> { const process = await startServer("./e2e/global-error/app.ts"); const baseUrl = "http://localhost:8000";
try { const result = await fetch(baseUrl + "/"); assertEquals(result.status, 400); assertEquals(await result.text(), "This page unprocessed error"); } finally { killServer(process); } },});