/* eslint-env jest, node */ import fs from "fs"; import path from "path"; const cssPath = path.resolve(__dirname, "../visually-hidden.css"); describe("VisuallyHidden CSS", () => { it("defines the semantic class in the components layer with the legacy declarations", () => { const css = fs.readFileSync(cssPath, "utf8"); expect(css).toContain("@layer components"); expect(css).toContain(".seeds-visually-hidden"); expect(css).toContain("position: absolute;"); expect(css).toContain("width: 1px;"); expect(css).toContain("height: 1px;"); expect(css).toContain("padding: 0;"); expect(css).toContain("margin: -1px;"); expect(css).toContain("overflow: hidden;"); expect(css).toContain("clip: rect(0 0 0 0);"); expect(css).toContain("border: 0;"); }); });