From 84bf581a31299d04303d92cd885fe65c6d4854f9 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Thu, 6 Oct 2022 07:32:46 +0100 Subject: [PATCH] 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 --- scripts/test.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.lua b/scripts/test.lua index 0574c55..2ee1bcc 100644 --- a/scripts/test.lua +++ b/scripts/test.lua @@ -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