From dc7480b59a70f201cbac28f8dba3a3697a18c3cb Mon Sep 17 00:00:00 2001 From: Gabriel Horner Date: Wed, 15 Mar 2023 14:56:11 -0400 Subject: [PATCH] Fix test failing b/c it was coupled by forgetting to reset Also fix other tests that don't reset --- src/test/frontend/handler/paste_test.cljs | 3 ++- src/test/frontend/handler/plugin_config_test.cljs | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/test/frontend/handler/paste_test.cljs b/src/test/frontend/handler/paste_test.cljs index dba60516e6..fe09c52608 100644 --- a/src/test/frontend/handler/paste_test.cljs +++ b/src/test/frontend/handler/paste_test.cljs @@ -87,4 +87,5 @@ commands/simple-insert! (fn [_input text] (p/resolved text)) util/get-selected-text (constantly nil)] (p/let [result ((paste-handler/editor-on-paste! nil true))] - (is (= expected-paste result))))))) + (is (= expected-paste result)) + (reset)))))) diff --git a/src/test/frontend/handler/plugin_config_test.cljs b/src/test/frontend/handler/plugin_config_test.cljs index 6509c96951..b06582ec5a 100644 --- a/src/test/frontend/handler/plugin_config_test.cljs +++ b/src/test/frontend/handler/plugin_config_test.cljs @@ -73,7 +73,9 @@ (plugin-config-handler/open-replace-plugins-modal) (is (string/starts-with? @error-message "Malformed plugins.edn") "User sees correct notification")) - (p/finally #(delete-global-config-dir dir)))))) + (p/finally #(do + (reset) + (delete-global-config-dir dir))))))) (deftest-async open-replace-plugins-modal-invalid-edn (let [dir (create-global-config-dir) @@ -89,7 +91,9 @@ (plugin-config-handler/open-replace-plugins-modal) (is (string/starts-with? @error-message "Invalid plugins.edn") "User sees correct notification")) - (p/finally #(delete-global-config-dir dir)))))) + (p/finally #(do + (reset) + (delete-global-config-dir dir))))))) (defn- installed-plugins->edn-plugins "Converts installed plugins state to edn.plugins format"