Revert "Revert "More performance improvements + etc.""

This commit is contained in:
Isiah Meadows 2015-12-16 11:04:07 -05:00
parent 897060d6ed
commit b2faa43f91
28 changed files with 3207 additions and 1326 deletions

View file

@ -17,6 +17,21 @@ describe("m()", function () {
expect(m).to.be.a("function")
})
it("throws with an empty tag name", function () {
expect(function () {
m("")
}).to.throw(TypeError)
})
it("throws when the tag is not a string or object", function () {
expect(function () { m(0) }).to.throw(TypeError)
expect(function () { m(1) }).to.throw(TypeError)
expect(function () { m(true) }).to.throw(TypeError)
expect(function () { m(null) }).to.throw(TypeError)
expect(function () { m(undefined) }).to.throw(TypeError)
expect(function () { m([]) }).to.throw(TypeError)
})
it("sets correct tag name", function () {
expect(m("div")).to.have.property("tag", "div")
})