local H=script.Parent.Parent.Parent local T=require(H.JestGlobals)local R=T.expect local a=T.test local U=T.beforeAll local h=T.afterAll local t=(require(H.DomTestingLibrary)).document local G=require(H.React)local n,F U(function()_G.RTL_SKIP_AUTO_CLEANUP="\116\114\117\101"local H=require(script.Parent.Parent)n=H.render F=H.cleanup end)h(function()_G.RTL_SKIP_AUTO_CLEANUP=nil F()end)a("\102\105\114\115\116",function()n(G.createElement("\084\101\120\116\076\097\098\101\108",{Text="\104\105"}))end)a("\115\101\099\111\110\100",function()(R(((t:GetChildren())[1]:GetChildren())[1]:IsA("\084\101\120\116\076\097\098\101\108"))).toBe(true);(R(((t:GetChildren())[1]:GetChildren())[1].Text)).toBe("\104\105")end)return{}
-- ROBLOX upstream: https://github.com/testing-library/react-testing-library/blob/v12.1.5/src/__tests__/auto-cleanup-skip.js
local Packages = script.Parent.Parent.Parent

local JestGlobals = require(Packages.JestGlobals)
local expect = JestGlobals.expect
local test = JestGlobals.test
local beforeAll = JestGlobals.beforeAll
local afterAll = JestGlobals.afterAll

local document = require(Packages.DomTestingLibrary).document

local React = require(Packages.React)
local render, cleanup
beforeAll(function()
	_G.RTL_SKIP_AUTO_CLEANUP = "true"
	local rtl = require(script.Parent.Parent)
	render = rtl.render
	-- ROBLOX deviation START: force cleanup
	cleanup = rtl.cleanup
	-- ROBLOX deviation END
end)

-- ROBLOX deviation START: restore so it cleans up after this test
afterAll(function()
	_G.RTL_SKIP_AUTO_CLEANUP = nil
	cleanup()
end)
-- ROBLOX deviation END

-- This one verifies that if RTL_SKIP_AUTO_CLEANUP is set
-- then we DON'T auto-wire up the afterEach for folks
test("first", function()
	render(React.createElement("TextLabel", { Text = "hi" }))
end)

test("second", function()
	expect(document:GetChildren()[1]:GetChildren()[1]:IsA("TextLabel")).toBe(true)
	expect(document:GetChildren()[1]:GetChildren()[1].Text).toBe("hi")
end)
return {}
