Packages
Emoticon Reporter

Emoticon Reporter

A simple alternative to the default Roblox TestEz reporter, this Reporter attempts to bundle in a few quality of life things to help make testing your code easier.

Emoji definitions:

  • 🟣 - Unknown Test Status
  • 🟢 - Successful Test Status
  • 🔴 - Failed Test Status
  • 🟡 - Skipped Test Status

Properties

Methods

ToString

Emoticon Reporter:ToString() -> string (opens in a new tab)

Returns a prettified string version of the state table.

	local Reporter = EmoticonReporter.new()
 
	print(tostring(Reporter)) -- EmoticonReporter<Status: idle>

StripErrorMessage

Emoticon Reporter:StripErrorMessage( stacktrace string (opens in a new tab) ) -> string (opens in a new tab)

Strips away common testez lines that can often obscure the stack trace


StripErrors

Emoticon Reporter:StripErrors( errorArray { string } (opens in a new tab) ) -> { string } (opens in a new tab)

QoL call that loops through an array and calls :StripErrorMessage


SerialiseNode

Emoticon Reporter:SerialiseNode( testEzNode { ... } ) -> string (opens in a new tab)

Primary method used to parse and compute testez result nodes, this function is recursive and will parse children of the passed in testez node.


SortDescendants

Emoticon Reporter:SortDescendants( children { testEzNode } ) -> { testEzNode }

Sorts the TestEz nodes so that we show any failed tests first instead of having to scroll to find what tests failed.


SerialiseHeadNode

Emoticon Reporter:SerialiseHeadNode( testEzNode { ... } ) -> string (opens in a new tab)

Primary method used to parse the testez head node, this function will then call :SerialiseNode to parse child nodes.


ParseReport

Emoticon Reporter:ParseReport( testEzNode { ... } ) -> nil (opens in a new tab)

Called by the TestEz library, used to parse test results.


Print

Emoticon Reporter:Print() -> nil (opens in a new tab)

Display the results of a test in the output, the Reporter won't display these results when TestEz reports the finished test, instead the developer will need to call this method to see the status of the test.


SetErrorsTruncated

Emoticon Reporter:SetErrorsTruncated( state boolean (opens in a new tab) ) -> nil (opens in a new tab)

Disable/Enable the ability for EmoticonReporter to strip away TestEz error messages


SetMaxScope

Emoticon Reporter:SetMaxScope( value number (opens in a new tab) ) -> nil (opens in a new tab)

Set the max scope for the Reporter to show, anything past the value passed in will be marked off as "Maximum node depth reached"


SetIsSorted

Emoticon Reporter:SetIsSorted( value number (opens in a new tab) ) -> nil (opens in a new tab)

Enable/Disable reporter sorting for the TestEz output.


Functions

new

Emoticon Reporter.new() -> nil (opens in a new tab)

Construct a new EmoticonReporter object

	local EmoticonReporter = require(ReplicatedStorage.DevPackages.EmoticonReporter)
	local Reporter = EmoticonReporter.new()
 
	TestEz.TestBootstrap:run({
		ServerScriptService.Modules,
	}, Reporter)
 
	Reporter:Print()