Something went wrong. Try again.
about things notes.zzstoatzz.io
notes
Something went wrong. Try again.
JavaScript
123456789101112131415161718192021import { describe, expect, test } from "bun:test";import { readFileSync } from "node:fs";
const diagrams = ["bloom-filters", "b-plus-trees", "union-find", "ring-buffers"];
describe("data-structure diagrams", () => { test("fit the content column without native hover tooltips", () => { const css = readFileSync("site/style.css", "utf8"); const figureCss = css.slice(css.indexOf(".content .ds-figure {"), css.indexOf(".content .ds-figure text"));
expect(figureCss).toContain("width: 100%"); expect(figureCss).not.toContain("min-width");
for (const name of diagrams) { const markdown = readFileSync(`data-structures/${name}.md`, "utf8"); expect(markdown).toContain('role="img" aria-label='); expect(markdown).not.toContain("<title"); } });});