print("\084\101\115\116\115\058 \076\111\097\100\105\110\103 \100\101\112\101\110\100\101\110\099\105\101\115\046\046\046")local R=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local s=require((R:WaitForChild("\084\101\115\116\115")):WaitForChild("\084\101\115\116\069\090"))print("\084\101\115\116\115\058 \067\111\110\115\116\114\117\099\116\105\110\103 \102\117\110\099\116\105\111\110\115\046\046\046")local function t(R)print()local t,W=xpcall(function()local t=s.TestBootstrap:run(R)return t.failureCount==0 end,debug.traceback)print()return t,W end print("\084\101\115\116\115\058 \068\111\110\101\046")return t
--- Provides a function to run tests.
-- The generic testing function can be run in whatever testing environtment is
-- being used, providing a layer of abstraction between the test suite and the
-- environment.
--
-- @author LastTalon
-- @version 0.1.0, 2020-10-13
-- @since 0.2
--
-- @module Tests
--
-- @see TestEZ

-- Dependencies --
print("Tests: Loading dependencies...")

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TestEZ = require(ReplicatedStorage:WaitForChild("Tests"):WaitForChild("TestEZ"))

-- Functions --
print("Tests: Constructing functions...")

--- The testing function.
-- Accepts a list of roots, runs tests on them, then reports on test status.
--
-- @param roots a table of roots to find tests
-- @return whether the tests completed
-- @return true if the tests were successful, false if the tests were
-- unsuccessful, an error message if the tests were not completed
local function Tests(roots)
	print()
	local completed, result = xpcall(function()
		local results = TestEZ.TestBootstrap:run(roots)
		return results.failureCount == 0
	end, debug.traceback)
	print()
	return completed, result
end

-- End --
print("Tests: Done.")

return Tests
