✅ Improved test coverage
This commit is contained in:
parent
2a99c9fce1
commit
dbcfea2a48
2 changed files with 79 additions and 0 deletions
|
@ -28,3 +28,13 @@ it("Should render attributes with given prefix only", () => {
|
|||
.set("transform", "scale(1)");
|
||||
expect(a.renderIfPrefixIs("data-")).to.equal(' text="foo bar" mode="test"');
|
||||
});
|
||||
|
||||
it("Should return attributes as array", () => {
|
||||
let a = newAttr()
|
||||
.set("class", "test")
|
||||
.add("class", "render");
|
||||
expect(JSON.stringify(a.getAsArray("class"))).to.equal(
|
||||
JSON.stringify(["test", "render"])
|
||||
);
|
||||
expect(a.getAsArray("nope")).to.equal(false);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue