local I=script.Parent.Parent local p=I.Parent local l=require(p.Dev.Roact)local t=require(p.Dev.ReactRoblox)local o=require(p.Dev.JestGlobals)local b=o.expect local q=o.describe local Y=o.it local S=(require(I.sierpinskiTriangleBenchmark))(l,t)q("\115\105\101\114\112\105\110\115\107\105 \116\114\105\097\110\103\108\101 \098\101\110\099\104\109\097\114\107 \116\101\115\116\115",function()Y("\115\104\111\117\108\100 \114\117\110 \116\104\101 \098\101\110\099\104\109\097\114\107 \097\110\100 \114\101\116\117\114\110 \099\097\108\099\117\108\097\116\101\100 \115\116\097\116\115",function()local I=2 local p=(S({sampleCount=I;useLegacyRoot=true;disableRenderStep=true})).results;(b(p)).toBeDefined();(b(p.min)).toBeGreaterThan(0);(b(p.min)).toBeLessThan(math.huge);(b(p.max)).toBeGreaterThan(0);(b(p.stdDev)).toBeGreaterThanOrEqual(0);(b(#p.samples)).toBe(I)end)end)
local testWorkspace = script.Parent.Parent
local rootWorkspace = testWorkspace.Parent

local Roact = require(rootWorkspace.Dev.Roact)
local ReactRoblox = require(rootWorkspace.Dev.ReactRoblox)
local JestGlobals = require(rootWorkspace.Dev.JestGlobals)
local jestExpect = JestGlobals.expect
local describe = JestGlobals.describe
local it = JestGlobals.it

local sierpinskiTriangleBenchmark = require(testWorkspace.sierpinskiTriangleBenchmark)(Roact, ReactRoblox)

describe("sierpinski triangle benchmark tests", function()
	it("should run the benchmark and return calculated stats", function()
		local sampleCount = 2
		local benchmarkStats = sierpinskiTriangleBenchmark({
			sampleCount = sampleCount,
			useLegacyRoot = true,
			disableRenderStep = true,
		}).results

		jestExpect(benchmarkStats).toBeDefined()
		jestExpect(benchmarkStats.min).toBeGreaterThan(0)
		jestExpect(benchmarkStats.min).toBeLessThan(math.huge)
		jestExpect(benchmarkStats.max).toBeGreaterThan(0)
		jestExpect(benchmarkStats.stdDev).toBeGreaterThanOrEqual(0)
		jestExpect(#benchmarkStats.samples).toBe(sampleCount)
	end)
end)
