deno.land / x / ruck@v5.0.0 / LinkCss.test.mjs

LinkCss.test.mjs
// @ts-check
import { createElement as h } from "react";import { renderToStaticMarkup } from "react-dom/server";import { assertStrictEquals } from "std/testing/asserts.ts";
import LinkCss from "./LinkCss.mjs";
Deno.test("`LinkCss` used as a React component, with prop `href` URL absolute.", () => { assertStrictEquals( renderToStaticMarkup( h(LinkCss, { href: "https://unpkg.com/device-agnostic-ui@10.0.0/global.css", }), ), '<link rel="stylesheet" href="https://unpkg.com/device-agnostic-ui@10.0.0/global.css" crossorigin="anonymous"/>', );});
Deno.test("`LinkCss` used as a React component, with prop `href` URL relative.", () => { assertStrictEquals( renderToStaticMarkup( h(LinkCss, { href: "/global.css", }), ), '<link rel="stylesheet" href="/global.css"/>', );});
ruck
Ruck is an open source buildless React web application framework for Deno.
GitHub Stars
74
Go to latest

Version Info

Tagged at
a month ago

External Dependencies