Sha256: e2fcfb94bd9e96351855104978b7a6d9dd160938af663dcdffef7fa36ce04026
Contents?: true
Size: 535 Bytes
Versions: 17
Compression:
Stored size: 535 Bytes
Contents
import { describe, it, expect } from "vitest" import { Image } from "./image" describe("Image", () => { it("returns empty string if no params", () => { expect(new Image("https://example.com/image.png", "").render).toBe("<img src='https://example.com/image.png' alt='' />") }) it("returns attributes and data attributes", () => { expect(new Image("https://example.com/image.png", "test", { id: "1", "data-foo": "bar" }).render).toBe(`<img src='https://example.com/image.png' alt='test' id='1' data-foo='bar'/>`) }) })
Version data entries
17 entries across 17 versions & 1 rubygems