local w=require(script.Parent.Parent.Util.BasicallyIdentical)return function()local u=require(script.Parent.Transparency)local T=Color3.fromHex("\035\070\070\054\066\048\048")local S=Color3.fromHex("\035\050\053\050\053\050\053")local Z={[0]=T;[13]=Color3.fromHex("\035\069\051\054\050\048\052"),[50]=Color3.fromHex("\035\057\049\052\055\049\050"),[94]=Color3.fromHex("\035\051\050\050\057\050\050");[100]=Color3.fromHex("\035\050\053\050\053\050\053")}it("\116\104\114\111\119\115 \105\102 \097\114\103\117\109\101\110\116\115 \097\114\101 \105\110\099\111\114\114\101\099\116 \116\121\112\101\115",function()(expect(function()u(true)end)).to.throw();(expect(function()u(S,true)end)).to.throw();(expect(function()u(S,T,true)end)).to.throw()end)for Z,g in pairs(Z)do local o=string.format("\099\111\114\114\101\099\116\108\121 \097\112\112\108\105\101\115 \102\105\108\116\101\114 \119\105\116\104 \116\114\097\110\115\112\097\114\101\110\099\121 \037\100\037\037",Z)it(o,function()local o=Z/100 local e=u(S,T,o);(expect(w(g,e))).to.equal(true)end)end end
local BasicallyIdentical = require(script.Parent.Parent.Util.BasicallyIdentical)

return function()
	local Filter = require(script.Parent.Transparency)

	local FOREGROUND = Color3.fromHex("#FF6B00")
	local BACKGROUND = Color3.fromHex("#252525")

	local RESULTS = {
		[0] = FOREGROUND,
		[13] = Color3.fromHex("#E36204"),
		[50] = Color3.fromHex("#914712"),
		[94] = Color3.fromHex("#322922"),
		[100] = Color3.fromHex("#252525"),
	}

	it("throws if arguments are incorrect types", function()
		expect(function()
			Filter(true)
		end).to.throw()

		expect(function()
			Filter(BACKGROUND, true)
		end).to.throw()

		expect(function()
			Filter(BACKGROUND, FOREGROUND, true)
		end).to.throw()
	end)

	for transparencyPercent, result in pairs(RESULTS) do
		local testName = string.format("correctly applies filter with transparency %d%%", transparencyPercent)

		it(testName, function()
			local transparency = transparencyPercent / 100
			local filterResult = Filter(BACKGROUND, FOREGROUND, transparency)

			expect(BasicallyIdentical(result, filterResult)).to.equal(true)
		end)
	end
end
