return function()local D=require(script.Parent.createElement)local F=require(script.Parent.createReconciler)local t=require(script.Parent.Logging)local v=require(script.Parent.NoopRenderer)local G=require(script.Parent.createReconcilerCompat)local u=F(v)local K=G(u)it("\114\101\105\102\121 \115\104\111\117\108\100 \111\110\108\121 \119\097\114\110 \111\110\099\101 \112\101\114 \099\097\108\108 \115\105\116\101",function()local F=t.capture(function()for F=1,2,1 do local t=K.reify(D("\083\116\114\105\110\103\086\097\108\117\101"))u.unmountVirtualTree(t)end end);(expect(#F.warnings)).to.equal(1);(expect(F.warnings[1]:find("\114\101\105\102\121"))).to.be.ok()F=t.capture(function()local F=K.reify(D("\083\116\114\105\110\103\086\097\108\117\101"))u.unmountVirtualTree(F)end);(expect(#F.warnings)).to.equal(1);(expect(F.warnings[1]:find("\114\101\105\102\121"))).to.be.ok()end)it("\116\101\097\114\100\111\119\110 \115\104\111\117\108\100 \111\110\108\121 \119\097\114\110 \111\110\099\101 \112\101\114 \099\097\108\108 \115\105\116\101",function()local F=t.capture(function()for F=1,2,1 do local t=u.mountVirtualTree(D("\083\116\114\105\110\103\086\097\108\117\101"))K.teardown(t)end end);(expect(#F.warnings)).to.equal(1);(expect(F.warnings[1]:find("\116\101\097\114\100\111\119\110"))).to.be.ok()F=t.capture(function()local F=u.mountVirtualTree(D("\083\116\114\105\110\103\086\097\108\117\101"))K.teardown(F)end);(expect(#F.warnings)).to.equal(1);(expect(F.warnings[1]:find("\116\101\097\114\100\111\119\110"))).to.be.ok()end)it("\117\112\100\097\116\101 \115\104\111\117\108\100 \111\110\108\121 \119\097\114\110 \111\110\099\101 \112\101\114 \099\097\108\108 \115\105\116\101",function()local F=t.capture(function()for F=1,2,1 do local t=u.mountVirtualTree(D("\083\116\114\105\110\103\086\097\108\117\101"))K.reconcile(t,D("\083\116\114\105\110\103\086\097\108\117\101"))u.unmountVirtualTree(t)end end);(expect(#F.warnings)).to.equal(1);(expect(F.warnings[1]:find("\114\101\099\111\110\099\105\108\101"))).to.be.ok()F=t.capture(function()local F=u.mountVirtualTree(D("\083\116\114\105\110\103\086\097\108\117\101"))K.reconcile(F,D("\083\116\114\105\110\103\086\097\108\117\101"))u.unmountVirtualTree(F)end);(expect(#F.warnings)).to.equal(1);(expect(F.warnings[1]:find("\114\101\099\111\110\099\105\108\101"))).to.be.ok()end)end
return function()
	local createElement = require(script.Parent.createElement)
	local createReconciler = require(script.Parent.createReconciler)
	local Logging = require(script.Parent.Logging)
	local NoopRenderer = require(script.Parent.NoopRenderer)

	local createReconcilerCompat = require(script.Parent.createReconcilerCompat)

	local noopReconciler = createReconciler(NoopRenderer)
	local compatReconciler = createReconcilerCompat(noopReconciler)

	it("reify should only warn once per call site", function()
		local logInfo = Logging.capture(function()
			-- We're using a loop so that we get the same stack trace and only one
			-- warning hopefully.
			for _ = 1, 2 do
				local handle = compatReconciler.reify(createElement("StringValue"))
				noopReconciler.unmountVirtualTree(handle)
			end
		end)

		expect(#logInfo.warnings).to.equal(1)
		expect(logInfo.warnings[1]:find("reify")).to.be.ok()

		logInfo = Logging.capture(function()
			-- This is a different call site, which should trigger another warning.
			local handle = compatReconciler.reify(createElement("StringValue"))
			noopReconciler.unmountVirtualTree(handle)
		end)

		expect(#logInfo.warnings).to.equal(1)
		expect(logInfo.warnings[1]:find("reify")).to.be.ok()
	end)

	it("teardown should only warn once per call site", function()
		local logInfo = Logging.capture(function()
			-- We're using a loop so that we get the same stack trace and only one
			-- warning hopefully.
			for _ = 1, 2 do
				local handle = noopReconciler.mountVirtualTree(createElement("StringValue"))
				compatReconciler.teardown(handle)
			end
		end)

		expect(#logInfo.warnings).to.equal(1)
		expect(logInfo.warnings[1]:find("teardown")).to.be.ok()

		logInfo = Logging.capture(function()
			-- This is a different call site, which should trigger another warning.
			local handle = noopReconciler.mountVirtualTree(createElement("StringValue"))
			compatReconciler.teardown(handle)
		end)

		expect(#logInfo.warnings).to.equal(1)
		expect(logInfo.warnings[1]:find("teardown")).to.be.ok()
	end)

	it("update should only warn once per call site", function()
		local logInfo = Logging.capture(function()
			-- We're using a loop so that we get the same stack trace and only one
			-- warning hopefully.
			for _ = 1, 2 do
				local handle = noopReconciler.mountVirtualTree(createElement("StringValue"))
				compatReconciler.reconcile(handle, createElement("StringValue"))
				noopReconciler.unmountVirtualTree(handle)
			end
		end)

		expect(#logInfo.warnings).to.equal(1)
		expect(logInfo.warnings[1]:find("reconcile")).to.be.ok()

		logInfo = Logging.capture(function()
			-- This is a different call site, which should trigger another warning.
			local handle = noopReconciler.mountVirtualTree(createElement("StringValue"))
			compatReconciler.reconcile(handle, createElement("StringValue"))
			noopReconciler.unmountVirtualTree(handle)
		end)

		expect(#logInfo.warnings).to.equal(1)
		expect(logInfo.warnings[1]:find("reconcile")).to.be.ok()
	end)
end