Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/packup/serve_test.ts

📦 Zero-config web application packager in Deno
Go to Latest
File
import { assertEquals } from "./test_deps.ts";
Deno.test("cli.ts serve <entrypoint> --port <port> -- serves the site at the given port", async () => { const p = Deno.run({ cmd: [ Deno.execPath(), "run", "-A", "--unstable", "cli.ts", "serve", "examples/simple/index.html", "--port", "4567", ], }); await new Promise((resolve) => setTimeout(resolve, 2000)); const res = await fetch("http://localhost:4567/index.html"); assertEquals( await res.text(), "<html><head></head><body><div>aaa</div>\n</body></html>", ); p.close();});