fix: only enable dev things in dev mode (#1789)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { ServerContext, Status } from "../server.ts";
|
||||
import { REFRESH_JS_URL } from "../src/server/constants.ts";
|
||||
import { assert, assertEquals, assertStringIncludes } from "./deps.ts";
|
||||
import manifest from "./fixture_error/fresh.gen.ts";
|
||||
|
||||
@@ -28,14 +27,3 @@ Deno.test("error page rendered", async () => {
|
||||
assertStringIncludes(body, `Error: boom!`);
|
||||
assertStringIncludes(body, `at render`);
|
||||
});
|
||||
Deno.test("refresh.js rendered", async () => {
|
||||
const resp = await router(
|
||||
new Request("https://fresh.deno.dev" + REFRESH_JS_URL),
|
||||
);
|
||||
assert(resp);
|
||||
assertEquals(resp.status, Status.OK);
|
||||
assertEquals(
|
||||
resp.headers.get("content-type"),
|
||||
"application/javascript; charset=utf-8",
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user