style: apply stylua formatter

This commit is contained in:
Erica Marigold 2024-12-08 17:42:05 +00:00
parent be2ae619c6
commit 0045c01c72
Signed by: DevComp
GPG key ID: 429EF1C337871656
7 changed files with 383 additions and 385 deletions

View file

@ -62,7 +62,6 @@ for _, test in discoverTests("src") do
or table.find(allowedTests, baseName)
or table.find(allowedTests, baseNameWithoutExt)
local constructors = {
case = frktest.test.case,
suite = frktest.test.suite,

View file

@ -11,7 +11,8 @@ local STYLE = table.freeze({
end,
report = function(name: string, state: "success" | "error" | "skip", elapsed: number)
local state_color: stdio.Color = if state == "success" then "green"
local state_color: stdio.Color = if state == "success"
then "green"
elseif state == "error" then "red"
elseif state == "skip" then "yellow"
else error("Invalid test state")
@ -39,15 +40,13 @@ function ReporterExt.init()
end)
frktest.test.on_test_leave(function(test)
print(
STYLE.report(
print(STYLE.report(
test.name,
if test.failed then "error" else "success",
-- Await receival of the timestamp and convert the difference to ms
(os.clock() - recv_ts()) * 1000
)
)
))
end)
frktest.test.on_test_skipped(function(test)