refactor(test): inject after_each differently

This commit is contained in:
Lewis Russell
2024-04-09 12:26:16 +01:00
committed by Lewis Russell
parent 889f81c65f
commit 81fc27124b
473 changed files with 478 additions and 476 deletions

View File

@@ -1022,8 +1022,12 @@ function module.mkdir_p(path)
return os.execute((is_os('win') and 'mkdir ' .. path or 'mkdir -p ' .. path))
end
--- @return test.functional.testutil
return function(after_each)
return function()
local g = getfenv(2)
--- @type function?
local after_each = g.after_each
if after_each then
after_each(function()
check_logs()