local w=require(script.Parent.Parent.Util.BasicallyIdentical)return function()local u=require(script.Parent.Monochromatic)local T=Color3.new(1,0,0)local S={Color3.new(.333,0,0);Color3.new(.666,0,0)}it("\116\104\114\111\119\115 \105\102 \097\114\103\117\109\101\110\116 \105\115 \110\111\116 \097 \067\111\108\111\114\051",function()(expect(pcall(u,true))).to.equal(false);(expect(pcall(u,1))).to.equal(false)end)it("\114\101\116\117\114\110\115 \097\110 \097\114\114\097\121 \111\102 \067\111\108\111\114\051\115",function()local w=u(Color3.new());(expect(type(w))).to.equal("\116\097\098\108\101");(expect(typeof(w[1]))).to.equal("\067\111\108\111\114\051")end)it("\114\101\116\117\114\110\115 \097 \118\097\108\105\100 \112\097\108\101\116\116\101 \102\111\114 \114\101\100",function()local Z=u(T);(expect(w(S[1],Z[1]))).to.equal(true);(expect(w(S[2],Z[2]))).to.equal(true)end)it("\116\104\114\111\119\115 \105\102 \097\114\103\117\109\101\110\116 \105\115 \110\111\116 \097 \110\117\109\098\101\114",function()(expect(function()u(Color3.new(),true)end)).to.throw()end)it("\099\097\110 \103\101\110\101\114\097\116\101 \097\110\121 \110\117\109\098\101\114 \111\102 \099\111\108\111\114\115",function()(expect(#u(T,2))).to.equal(2);(expect(#u(T,30))).to.equal(30)end)end
local BasicallyIdentical = require(script.Parent.Parent.Util.BasicallyIdentical)

return function()
	local Monochromatic = require(script.Parent.Monochromatic)

	local swatch = Color3.new(1, 0, 0)
	local results = {
		Color3.new(0.333, 0, 0),
		Color3.new(0.666, 0, 0),
	}

	it("throws if argument is not a Color3", function()
		expect(pcall(Monochromatic, true)).to.equal(false)
		expect(pcall(Monochromatic, 1)).to.equal(false)
	end)

	it("returns an array of Color3s", function()
		local result = Monochromatic(Color3.new())

		expect(type(result)).to.equal("table")
		expect(typeof(result[1])).to.equal("Color3")
	end)

	it("returns a valid palette for red", function()
		local result = Monochromatic(swatch)

		expect(BasicallyIdentical(results[1], result[1])).to.equal(true)
		expect(BasicallyIdentical(results[2], result[2])).to.equal(true)
	end)

	it("throws if argument is not a number", function()
		expect(function()
			Monochromatic(Color3.new(), true)
		end).to.throw()
	end)

	it("can generate any number of colors", function()
		expect(#Monochromatic(swatch, 2)).to.equal(2)
		expect(#Monochromatic(swatch, 30)).to.equal(30)
	end)
end
