       (swap! total inc)
 
       (try
+        (remove-canvases)
         ((:fn sketch))
 
         (catch js/Error e

            :size (:size opts default-size)
            :renderer (:renderer opts :p2d)
            :host (or (:host opts)
                       (get default-host (:renderer opts :p2d)))
            :setup (:setup snippet)

            :draw (fn []

                      ((:body snippet))
                      (catch js/Error e
                        (swap! failed inc)
                        (throw e)))))))})

(def test-functions (mapv snippet-to-test-function as/all-snippets))

