return function()
local Type = require(script.Parent.Parent.Type)
local Component = require(script.Parent.Parent.Component)
it("should be extendable", function()
local MyComponent = Component:extend("The Senate")
expect(MyComponent).to.be.ok()
expect(Type.of(MyComponent)).to.equal(Type.StatefulComponentClass)
end)
it("should prevent extending a user component", function()
local MyComponent = Component:extend("Sheev")
expect(function()
MyComponent:extend("Frank")
end).to.throw()
end)
it("should use a given name", function()
local MyComponent = Component:extend("FooBar")
local name = tostring(MyComponent)
expect(name).to.be.a("string")
expect(name:find("FooBar")).to.be.ok()
end)
end