diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-04-09 12:26:16 +0100 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-04-10 15:53:50 +0100 |
commit | 81fc27124b9e1b375e0ce9605ae69c3c2a2d9222 (patch) | |
tree | 31a5626cd48b358a53756636a6f813acac41ef06 /test/functional/testutil.lua | |
parent | 889f81c65fa4318ab0fba391904dc43e5633b13e (diff) | |
download | rneovim-81fc27124b9e1b375e0ce9605ae69c3c2a2d9222.tar.gz rneovim-81fc27124b9e1b375e0ce9605ae69c3c2a2d9222.tar.bz2 rneovim-81fc27124b9e1b375e0ce9605ae69c3c2a2d9222.zip |
refactor(test): inject after_each differently
Diffstat (limited to 'test/functional/testutil.lua')
-rw-r--r-- | test/functional/testutil.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/testutil.lua b/test/functional/testutil.lua index e6d89eb302..efd7790764 100644 --- a/test/functional/testutil.lua +++ b/test/functional/testutil.lua @@ -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() |