about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-12 07:37:02 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-12 07:37:02 -0700
commit9ada7cf833616846c53c5e7c1c9c824e54e567d9 (patch)
tree77aa453672a7f4e531a6e9550543fb54c8c1bc80
parente8ff9f285fe8630e74de01d9f9a6d9a833b4c78b (diff)
downloadtext.love-9ada7cf833616846c53c5e7c1c9c824e54e567d9.tar.gz
delete all tests once they've executed
-rw-r--r--app.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/app.lua b/app.lua
index efc2a9a..68c06a4 100644
--- a/app.lua
+++ b/app.lua
@@ -260,6 +260,10 @@ function App.run_tests()
     _G[name]()
   end
   print()
+  -- clean up all test methods
+  for _,name in ipairs(sorted_names) do
+    _G[name] = nil
+  end
 end
 
 -- call this once all tests are run