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

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

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


(defn run-selected-test [event]
  (let [select (.-target event)
        option (aget select (.-selectedIndex select))]
    (remove-canvases)
    ((:fn (.-testData option)))))

(defn init-test-selection [input]
