local K=require(script.Parent.Maid)return function()it("\115\104\111\117\108\100 \115\117\112\112\111\114\116 \098\097\115\105\099 \109\097\105\100",function()local M=K.new()M:Add(function() end);(expect(#M._tasks)).to.equal(1)end)it("\115\104\111\117\108\100 \110\111\116 \115\117\112\112\111\114\116 \115\101\116\116\105\110\103 \110\111\110-\116\097\115\107 \118\097\108\117\101\115",function()local M=K.new();(expect(function()M:Add(10)end)).to.throw();(expect(function()M.Test=10 end)).to.throw()end)it("\115\104\111\117\108\100 \103\101\116\047\115\101\116 \105\110 \109\097\105\100",function()local M=K.new()local D=function() end M.Job=D local b=(game:GetService("\082\117\110\083\101\114\118\105\099\101")).RenderStepped:Connect(function() end)M.RenderStepped=b M.Testing={Destroy=function()print("\091\077\097\105\100\093 \068\101\115\116\114\111\121\101\100\033")end};(expect(M.Job)).to.be.ok();(expect(M.Job)).to.equal(D);(expect(M.RenderStepped)).to.be.ok();(expect(M.RenderStepped)).to.equal(b)M:Clean();(expect(M.Job)).never.to.be.ok();(expect(M.RenderStepped)).never.to.be.ok()end)end
local Maid = require(script.Parent.Maid)

return function()
	it(
		"should support basic maid",
		function()
			local maid = Maid.new()
			maid:Add(
				function()
				end
			)

			expect(#maid._tasks).to.equal(1)
		end
	)
	it(
		"should not support setting non-task values",
		function()
			local maid = Maid.new()

			expect(
				function()
					maid:Add(10)
				end
			).to.throw()
			expect(
				function()
					maid.Test = 10
				end
			).to.throw()
		end
	)
	it(
		"should get/set in maid",
		function()
			local maid = Maid.new()
			local newJob = function()
			end

			maid.Job = newJob

			local renderStepped =
				game:GetService("RunService").RenderStepped:Connect(
				function()
				end
			)
			maid.RenderStepped = renderStepped

			maid.Testing = {Destroy = function()
					print("[Maid] Destroyed!")
				end}

			expect(maid.Job).to.be.ok()
			expect(maid.Job).to.equal(newJob)

			expect(maid.RenderStepped).to.be.ok()
			expect(maid.RenderStepped).to.equal(renderStepped)

			maid:Clean()

			expect(maid.Job).never.to.be.ok()
			expect(maid.RenderStepped).never.to.be.ok()
		end
	)
end
