test: improve style of the test output

Add more space around the text, also make the text a readable color on
dark backgrounds.
This commit is contained in:
Ade Attwood 2022-10-06 07:41:44 +01:00
parent 84bf581a31
commit b255d91e6d

View file

@ -57,14 +57,14 @@ _G.it = function(name, callback)
call_hook "after_each"
local prefix = "\x1B[42mPASS"
local prefix = "\x1B[42m\x1B[30m PASS "
global_context.total = global_context.total + 1
if status then
global_context.pass = global_context.pass + 1
else
global_context.fail = global_context.fail + 1
prefix = "\x1B[41mFAIL"
prefix = "\x1B[41m\x1B[30m FAIL "
end
print(string.format("%s\x1B[0m %s - %s (%.3f ms)", prefix, global_context.current_test_name, name, elapsed))