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:
parent
afbf2892af
commit
84bf581a31
1 changed files with 1 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ _G.it = function(name, callback)
|
||||||
local status, err = pcall(callback, context)
|
local status, err = pcall(callback, context)
|
||||||
local elapsed = (os.clock() * 1000) - time
|
local elapsed = (os.clock() * 1000) - time
|
||||||
|
|
||||||
call_hook "before_each"
|
call_hook "after_each"
|
||||||
|
|
||||||
local prefix = "\x1B[42mPASS"
|
local prefix = "\x1B[42mPASS"
|
||||||
global_context.total = global_context.total + 1
|
global_context.total = global_context.total + 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue