return function()local u=require(script.Parent)it("\115\104\111\117\108\100 \098\101 \097 \102\117\110\099\116\105\111\110",function()(expect(u)).to.be.a("\102\117\110\099\116\105\111\110")end)it("\115\104\111\117\108\100 \115\101\116 \116\104\101 \110\097\109\101 \111\102 \116\104\101 \097\099\116\105\111\110\067\114\101\097\116\111\114 \099\114\101\097\116\111\114",function()local q=u("\102\111\111",function()return{}end);(expect(q.name)).to.equal("\102\111\111")end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \116\097\098\108\101 \119\104\101\110 \099\097\108\108\101\100 \097\115 \097 \102\117\110\099\116\105\111\110",function()local q=u("\102\111\111",function()return{}end);(expect(q())).to.be.a("\116\097\098\108\101")end)it("\115\104\111\117\108\100 \115\101\116 \116\104\101 \116\121\112\101 \111\102 \116\104\101 \097\099\116\105\111\110 \099\114\101\097\116\111\114",function()local q=u("\102\111\111",function()return{}end);(expect((q()).type)).to.equal("\102\111\111")end)it("\115\104\111\117\108\100 \115\101\116 \118\097\108\117\101\115",function()local q=u("\102\111\111",function(u)return{value=u}end);(expect((q(100)).value)).to.equal(100)end)it("\115\104\111\117\108\100 \116\104\114\111\119 \119\104\101\110 \105\116\115 \114\101\115\117\108\116 \100\111\101\115 \110\111\116 \114\101\116\117\114\110 \097 \116\097\098\108\101",function()local q=u("\102\111\111",function()return function() end end);(expect(q)).to.throw()end)end
return function()
	local makeActionCreator = require(script.Parent)

	it("should be a function", function()
		expect(makeActionCreator).to.be.a("function")
	end)

	it("should set the name of the actionCreator creator", function()
		local FooAction = makeActionCreator("foo", function()
			return {}
		end)

		expect(FooAction.name).to.equal("foo")
	end)

	it("should return a table when called as a function", function()
		local FooAction = makeActionCreator("foo", function()
			return {}
		end)

		expect(FooAction()).to.be.a("table")
	end)

	it("should set the type of the action creator", function()
		local FooAction = makeActionCreator("foo", function()
			return {}
		end)

		expect(FooAction().type).to.equal("foo")
	end)

	it("should set values", function()
		local FooAction = makeActionCreator("foo", function(value)
			return {
				value = value,
			}
		end)

		expect(FooAction(100).value).to.equal(100)
	end)

	it("should throw when its result does not return a table", function()
		local FooAction = makeActionCreator("foo", function()
			return function() end
		end)

		expect(FooAction).to.throw()
	end)
end
