test: fix the after_each hook not getting called

When writing tests the `after_each` function was never getting called
due to the `before_each` function getting called instead
This commit is contained in:
Ade Attwood 2022-10-06 07:32:46 +01:00
parent afbf2892af
commit 84bf581a31

View file

@ -55,7 +55,7 @@ _G.it = function(name, callback)
local status, err = pcall(callback, context)
local elapsed = (os.clock() * 1000) - time
call_hook "before_each"
call_hook "after_each"
local prefix = "\x1B[42mPASS"
global_context.total = global_context.total + 1