Back

Version 10

11/15/2023
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
import { html } from "https://esm.town/v/lbb00/html";

const TitleTextDefault = ":)";
const Title = (text) => html`<h1>${text || TitleTextDefault}</h1>`;

assertEquals(
html`<html><body>${Title}</body></html>`,
"<html><body><h1>:)</h1></body></html>",
);
assertEquals(
html`<html><body>${Title("!")}</body></html>`,
"<html><body><h1>i</h1></body></html>",
);
Updated: November 19, 2023