return function()local l=require(script.Parent.filter)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \099\111\112\121 \111\102 \116\104\101 \103\105\118\101\110 \100\105\099\116\105\111\110\097\114\121 \119\105\116\104 \111\110\108\121 \116\104\101 \101\108\101\109\101\110\116\115 \116\104\097\116 \109\097\116\099\104 \116\104\101 \112\114\101\100\105\099\097\116\101",function()local I={hello="\119\111\114\108\100",goodbye="\103\111\111\100\098\121\101"}local b=l(I,function(l)return l=="\119\111\114\108\100"end);(expect(b)).to.be.a("\116\097\098\108\101");(expect(b)).never.to.equal(I);(expect(b.hello)).to.equal("\119\111\114\108\100")end)it("\115\104\111\117\108\100 \110\111\116 \109\111\100\105\102\121 \116\104\101 \111\114\105\103\105\110\097\108 \100\105\099\116\105\111\110\097\114\121",function()local I={hello="\119\111\114\108\100";goodbye="\103\111\111\100\098\121\101"}local b=l(I,function(l)return l=="\119\111\114\108\100"end);(expect(b)).never.to.equal(I);(expect(I.hello)).to.equal("\119\111\114\108\100");(expect(I.goodbye)).to.equal("\103\111\111\100\098\121\101");(expect(b.hello)).to.equal("\119\111\114\108\100")end)end
return function()
	local Filter = require(script.Parent.filter)

	it("should return a copy of the given dictionary with only the elements that match the predicate", function()
		local dictionary = { hello = "world", goodbye = "goodbye" }

		local new = Filter(dictionary, function(value)
			return value == "world"
		end)

		expect(new).to.be.a("table")
		expect(new).never.to.equal(dictionary)

		expect(new.hello).to.equal("world")
	end)

	it("should not modify the original dictionary", function()
		local dictionary = { hello = "world", goodbye = "goodbye" }

		local new = Filter(dictionary, function(value)
			return value == "world"
		end)

		expect(new).never.to.equal(dictionary)

		expect(dictionary.hello).to.equal("world")
		expect(dictionary.goodbye).to.equal("goodbye")

		expect(new.hello).to.equal("world")
	end)
end
