return function()local e=require(script.Parent)it("\115\104\111\117\108\100 \101\120\112\111\115\101 \097 \099\111\110\115\116\114\117\099\116\111\114 \102\117\110\099\116\105\111\110",function()(expect(e)).to.be.a("\102\117\110\099\116\105\111\110")end)it("\115\104\111\117\108\100 \116\104\114\111\119 \097\110 \101\114\114\111\114 \111\110 \097\116\116\101\109\112\116 \116\111 \109\111\100\105\102\121 \069\110\117\109\101\114\097\116\111\114",function()(expect(function()(e("\097",{"\097"})).NEW_FIELD={}end)).to.throw();(expect(function()(getmetatable(e("\097",{"\097"}))).__index={}end)).to.throw();(expect(function()setmetatable(e("\097",{"\097"}),{})end)).to.throw()end)it("\115\104\111\117\108\100 \105\109\112\108\101\109\101\110\116 \095\095\116\111\115\116\114\105\110\103 \109\101\116\097\109\101\116\104\111\100",function()(expect(function()local Z=e("\097",{"\097"})assert(tostring(Z)=="\097")assert(tostring(Z.a)=="\097\046\097")end)).never.to.throw()end)describe("\069\110\117\109\101\114\097\116\111\114\073\116\101\109",function()it("\115\104\111\117\108\100 \116\104\114\111\119 \097\110 \101\114\114\111\114 \111\110 \097\116\116\101\109\112\116 \116\111 \109\111\100\105\102\121 \097 \116\097\098\108\101",function()(expect(function()(e("\097",{"\097"})).a.NEW_FIELD={}end)).to.throw();(expect(function()setmetatable((e("\097",{"\097"})).a,{})end)).to.throw();(expect(function()(getmetatable((e("\097",{"\097"})).a)).__index={}end)).to.throw()end)it("\115\104\111\117\108\100 \105\109\112\108\101\109\101\110\116 \095\095\116\111\115\116\114\105\110\103 \109\101\116\097\109\101\116\104\111\100",function()(expect(function()assert(tostring((e("\097",{"\097"})).a)=="\097\046\097")end)).never.to.throw()end)end)end
return function()
	local Enumerator = require(script.Parent)

	it("should expose a constructor function", function()
		expect(Enumerator).to.be.a("function")
	end)

	it("should throw an error on attempt to modify Enumerator", function()
		expect(function()
			Enumerator("a", { "a" }).NEW_FIELD = {}
		end).to.throw()

		expect(function()
			getmetatable(Enumerator("a", { "a" })).__index = {}
		end).to.throw()

		expect(function()
			setmetatable(Enumerator("a", { "a" }), {})
		end).to.throw()
	end)

	it("should implement __tostring metamethod", function()
		expect(function()
			local enumerator = Enumerator("a", { "a" })
			assert(tostring(enumerator) == "a")
			assert(tostring(enumerator.a) == "a.a")
		end).never.to.throw()
	end)

	describe("EnumeratorItem", function()
		it("should throw an error on attempt to modify a table", function()
			expect(function()
				Enumerator("a", { "a" }).a.NEW_FIELD = {}
			end).to.throw()

			expect(function()
				setmetatable(Enumerator("a", { "a" }).a, {})
			end).to.throw()

			expect(function()
				getmetatable(Enumerator("a", { "a" }).a).__index = {}
			end).to.throw()
		end)

		it("should implement __tostring metamethod", function()
			expect(function()
				assert(tostring(Enumerator("a", { "a" }).a) == "a.a")
			end).never.to.throw()
		end)
	end)
end
