Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/aleph/tests/server_media_type_test.ts

The Full-stack Framework in Deno.
Very Popular
Latest
File
import { assertEquals } from "std/testing/asserts.ts";import { getContentType } from "../server/media_type.ts";
Deno.test("[unit] server/media_type.ts: getContentType", () => { assertEquals(getContentType("/mod.ts"), "application/typescript"); assertEquals(getContentType("/mod.tsx"), "text/tsx"); assertEquals(getContentType("/compression.gz"), "application/gzip"); assertEquals(getContentType("/compression.tar"), "application/tar"); assertEquals(getContentType("/compression.tar.gz"), "application/tar+gzip"); assertEquals(getContentType("/unknown"), "application/octet-stream");});