Skip to content

Commit

Permalink
Update testkit so its output is actually viewable on github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gaymeowing committed Jul 28, 2024
1 parent 8eef28d commit 01d8e5e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions testkit.luau
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ local test: Test?
local tests: { Test } = {}

local function output_test_result(test: Test)
print(color.white(test.name))
print(color.white_underline(test.name))

for _, case in test.cases do
local status = ({
Expand All @@ -127,12 +127,12 @@ local function output_test_result(test: Test)

local line = case.result == FAIL and color.red(`{case.line}:`) or ""

print(`{status}{WALL} {line}{color.gray(case.name)}`)
print(`{status}{WALL} {line}{color.white(case.name)}`)
end

if test.error then
print(color.gray "error: " .. color.red(test.error.message))
print(color.gray "trace: " .. color.red(test.error.trace))
print(color.white "error: " .. color.red(test.error.message))
print(color.white "trace: " .. color.red(test.error.trace))
else
print()
end
Expand Down Expand Up @@ -221,7 +221,7 @@ local function FINISH(): boolean
output_test_result(test)
end

print(color.gray(string.format(
print(color.white(string.format(
`{passed_cases}/{total_cases} test cases passed in %.3f ms.`,
duration*1e3
)))
Expand Down

0 comments on commit 01d8e5e

Please sign in to comment.