return function()local W=require(script.Parent.Parent.Component)local R=require(script.Parent.Parent.Portal)local z=require(script.Parent)describe("\111\102",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \110\105\108 \102\111\114 \110\111\110-\116\097\098\108\101 \118\097\108\117\101\115",function()(expect(z.of(nil))).to.equal(nil);(expect(z.of(5))).to.equal(nil);(expect(z.of(newproxy(true)))).to.equal(nil)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \110\105\108 \102\111\114 \116\097\098\108\101 \118\097\108\117\101\115 \119\105\116\104\111\117\116 \097\110 \069\108\101\109\101\110\116\075\105\110\100 \107\101\121",function()(expect(z.of({}))).to.equal(nil)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\104\101 \069\108\101\109\101\110\116\075\105\110\100 \102\114\111\109 \097 \116\097\098\108\101",function()local W={[z]=z.Stateful};(expect(z.of(W))).to.equal(z.Stateful)end)end)describe("\102\114\111\109\067\111\109\112\111\110\101\110\116",function()it("\115\104\111\117\108\100 \104\097\110\100\108\101 \104\111\115\116 \099\111\109\112\111\110\101\110\116\115",function()(expect(z.fromComponent("\102\111\111"))).to.equal(z.Host)end)it("\115\104\111\117\108\100 \104\097\110\100\108\101 \102\117\110\099\116\105\111\110 \099\111\109\112\111\110\101\110\116\115",function()local function W() end;(expect(z.fromComponent(W))).to.equal(z.Function)end)it("\115\104\111\117\108\100 \104\097\110\100\108\101 \115\116\097\116\101\102\117\108 \099\111\109\112\111\110\101\110\116\115",function()local R=W:extend("\070\111\111");(expect(z.fromComponent(R))).to.equal(z.Stateful)end)it("\115\104\111\117\108\100 \104\097\110\100\108\101 \112\111\114\116\097\108\115",function()(expect(z.fromComponent(R))).to.equal(z.Portal)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \110\105\108 \102\111\114 \105\110\118\097\108\105\100 \105\110\112\117\116\115",function()(expect(z.fromComponent(5))).to.equal(nil);(expect(z.fromComponent(newproxy(true)))).to.equal(nil)end)end)end
return function()
	local Component = require(script.Parent.Parent.Component)
	local Portal = require(script.Parent.Parent.Portal)

	local ElementKind = require(script.Parent)

	describe("of", function()
		it("should return nil for non-table values", function()
			expect(ElementKind.of(nil)).to.equal(nil)
			expect(ElementKind.of(5)).to.equal(nil)
			expect(ElementKind.of(newproxy(true))).to.equal(nil)
		end)

		it("should return nil for table values without an ElementKind key", function()
			expect(ElementKind.of({})).to.equal(nil)
		end)

		it("should return the ElementKind from a table", function()
			local value = {
				[ElementKind] = ElementKind.Stateful,
			}

			expect(ElementKind.of(value)).to.equal(ElementKind.Stateful)
		end)
	end)

	describe("fromComponent", function()
		it("should handle host components", function()
			expect(ElementKind.fromComponent("foo")).to.equal(ElementKind.Host)
		end)

		it("should handle function components", function()
			local function foo() end

			expect(ElementKind.fromComponent(foo)).to.equal(ElementKind.Function)
		end)

		it("should handle stateful components", function()
			local Foo = Component:extend("Foo")

			expect(ElementKind.fromComponent(Foo)).to.equal(ElementKind.Stateful)
		end)

		it("should handle portals", function()
			expect(ElementKind.fromComponent(Portal)).to.equal(ElementKind.Portal)
		end)

		it("should return nil for invalid inputs", function()
			expect(ElementKind.fromComponent(5)).to.equal(nil)
			expect(ElementKind.fromComponent(newproxy(true))).to.equal(nil)
		end)
	end)
end
