Sha256: c472cb5070f166acfc708fcfe945ba2c1cf76bbfb25b776fe77e7e22fceeba33
Contents?: true
Size: 817 Bytes
Versions: 9
Compression:
Stored size: 817 Bytes
Contents
import { describe, it, expect } from "vitest" import { TextArea } from "./text-area" describe("TextArea", () => { it("returns empty string if no params", () => { expect(new TextArea({}, "foo").renderWrapper).toBe("<textarea data-attribute='foo'></textarea>") }) it("returns attributes and data attributes", () => { expect(new TextArea({ foo: "bar" }, "foo", { id: "1", "data-foo": "bar" }).renderWrapper).toBe(`<textarea id='1' data-foo='bar' data-attribute='foo'>bar</textarea>`) }) it("returns attributes and data attributes with custom data attributes", () => { expect(new TextArea({ foo: "bar" }, "foo", { id: "1", data: { foo: { baz: "qux", quux: "corge" } } }).renderWrapper).toBe(`<textarea id='1' data-attribute='foo' data-foo-baz='qux' data-foo-quux='corge'>bar</textarea>`) }) })
Version data entries
9 entries across 9 versions & 1 rubygems