return function()local Y=require(script.Parent.createElement)local i=require(script.Parent.NoopRenderer)local h=require(script.Parent.createReconciler)local x=require(script.Parent.PureComponent)local C=h(i)it("\115\104\111\117\108\100 \098\101 \101\120\116\101\110\100\097\098\108\101",function()local Y=x:extend("\077\121\067\111\109\112\111\110\101\110\116");(expect(Y)).to.be.ok()end)it("\115\104\111\117\108\100 \115\107\105\112 \117\112\100\097\116\101\115 \102\111\114 \115\104\097\108\108\111\119-\101\113\117\097\108 \112\114\111\112\115",function()local i=0 local h local P=x:extend("\080\117\114\101\067\104\105\108\100")function P.willUpdate(Y)i=i+1 end function P.render(Y)return nil end local R=x:extend("\080\117\114\101\067\111\110\116\097\105\110\101\114")function R.init(Y)Y.state={value=0}end function R.didMount(Y)h=function(i)Y:setState({value=i})end end function R.render(i)return Y(P,{value=i.state.value})end local K=Y(R)local A=C.mountVirtualTree(K,nil,"\080\117\114\101\067\111\109\112\111\110\101\110\116 \084\114\101\101");(expect(i)).to.equal(0)h(1);(expect(i)).to.equal(1)h(1);(expect(i)).to.equal(1)h(2);(expect(i)).to.equal(2)h(1);(expect(i)).to.equal(3)C.unmountVirtualTree(A)end)end
return function()
	local createElement = require(script.Parent.createElement)
	local NoopRenderer = require(script.Parent.NoopRenderer)
	local createReconciler = require(script.Parent.createReconciler)

	local PureComponent = require(script.Parent.PureComponent)

	local noopReconciler = createReconciler(NoopRenderer)

	it("should be extendable", function()
		local MyComponent = PureComponent:extend("MyComponent")

		expect(MyComponent).to.be.ok()
	end)

	it("should skip updates for shallow-equal props", function()
		local updateCount = 0
		local setValue

		local PureChild = PureComponent:extend("PureChild")

		function PureChild:willUpdate()
			updateCount = updateCount + 1
		end

		function PureChild:render()
			return nil
		end

		local PureContainer = PureComponent:extend("PureContainer")

		function PureContainer:init()
			self.state = {
				value = 0,
			}
		end

		function PureContainer:didMount()
			setValue = function(value)
				self:setState({
					value = value,
				})
			end
		end

		function PureContainer:render()
			return createElement(PureChild, {
				value = self.state.value,
			})
		end

		local element = createElement(PureContainer)
		local tree = noopReconciler.mountVirtualTree(element, nil, "PureComponent Tree")

		expect(updateCount).to.equal(0)

		setValue(1)

		expect(updateCount).to.equal(1)

		setValue(1)

		expect(updateCount).to.equal(1)

		setValue(2)

		expect(updateCount).to.equal(2)

		setValue(1)

		expect(updateCount).to.equal(3)

		noopReconciler.unmountVirtualTree(tree)
	end)
end
