Skip to content

Commit

Permalink
show amount of focus cases passed
Browse files Browse the repository at this point in the history
  • Loading branch information
alicesaidhi committed Jul 23, 2024
1 parent c3a56bb commit 174e2a1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/testkit.luau
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,21 @@ local function FINISH(): boolean
local success = true
local total_cases = 0
local passed_cases = 0
local passed_focus_cases = 0
local total_focus_cases = 0
local duration = 0

for _, test in tests do
duration += test.duration
for _, case in test.cases do
total_cases += 1
if case.focus or test.focus then
total_focus_cases += 1
end
if case.result == PASS or case.result == NONE or case.result == SKIPPED then
if case.focus or test.focus then
passed_focus_cases += 1
end
passed_cases += 1
else
success = false
Expand All @@ -271,6 +279,11 @@ local function FINISH(): boolean
)
)
)
if check_for_focused then
print(
color.gray(`{passed_focus_cases}/{total_focus_cases} focused test cases passed`)
)
end

local fails = total_cases - passed_cases

Expand Down

0 comments on commit 174e2a1

Please sign in to comment.