return function()local d=require(script.Parent.createElement)local o=require(script.Parent.createReconciler)local H=require(script.Parent.Logging)local E=require(script.Parent.NoopRenderer)local r=require(script.Parent.createReconcilerCompat)local D=o(E)local N=r(D)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 o=H.capture(function()for o=1,2,1 do local H=N.reify(d("\083\116\114\105\110\103\086\097\108\117\101"))D.unmountVirtualTree(H)end end);(expect(#o.warnings)).to.equal(1);(expect(o.warnings[1]:find("\114\101\105\102\121"))).to.be.ok()o=H.capture(function()local o=N.reify(d("\083\116\114\105\110\103\086\097\108\117\101"))D.unmountVirtualTree(o)end);(expect(#o.warnings)).to.equal(1);(expect(o.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 o=H.capture(function()for o=1,2,1 do local H=D.mountVirtualTree(d("\083\116\114\105\110\103\086\097\108\117\101"))N.teardown(H)end end);(expect(#o.warnings)).to.equal(1);(expect(o.warnings[1]:find("\116\101\097\114\100\111\119\110"))).to.be.ok()o=H.capture(function()local o=D.mountVirtualTree(d("\083\116\114\105\110\103\086\097\108\117\101"))N.teardown(o)end);(expect(#o.warnings)).to.equal(1);(expect(o.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 o=H.capture(function()for o=1,2,1 do local H=D.mountVirtualTree(d("\083\116\114\105\110\103\086\097\108\117\101"))N.reconcile(H,d("\083\116\114\105\110\103\086\097\108\117\101"))D.unmountVirtualTree(H)end end);(expect(#o.warnings)).to.equal(1);(expect(o.warnings[1]:find("\114\101\099\111\110\099\105\108\101"))).to.be.ok()o=H.capture(function()local o=D.mountVirtualTree(d("\083\116\114\105\110\103\086\097\108\117\101"))N.reconcile(o,d("\083\116\114\105\110\103\086\097\108\117\101"))D.unmountVirtualTree(o)end);(expect(#o.warnings)).to.equal(1);(expect(o.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
