Skip to content

Commit 3064671

Browse files
committed
apply code review
1 parent f6597fb commit 3064671

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/test/clojure/com/github/clojure_lsp/intellij/slurp_action_test.clj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@
2323
The test ensures that the Forward Slurp action correctly modifies the code structure
2424
by moving the closing parenthesis forward."
2525
(let [project-name "clojure.core"
26-
{:keys [fixture project deps-file]} (test-utils/setup-test-project project-name)
27-
clj-file (.copyFileToProject ^CodeInsightTestFixture fixture "foo.clj")]
26+
{:keys [fixtures project deps-file]} (test-utils/setup-test-project project-name)
27+
clj-file (.copyFileToProject ^CodeInsightTestFixture fixtures "foo.clj")]
2828
(is (= project-name (.getName ^Project project)))
2929
(is deps-file)
3030

31-
(let [editor (test-utils/open-file-in-editor fixture clj-file)]
31+
(let [editor (test-utils/open-file-in-editor fixtures clj-file)]
3232
(test-utils/setup-lsp-server project)
3333
(editor/move-caret-to-position editor 2 8)
3434
(test-utils/run-editor-action "ClojureLSP.ForwardSlurp" project)
3535
(clj4intellij.test/dispatch-all)
36-
(println (test-utils/get-editor-text fixture))
37-
(.checkResultByFile ^CodeInsightTestFixture fixture "foo_expected.clj")
36+
37+
(.checkResultByFile ^CodeInsightTestFixture fixtures "foo_expected.clj")
38+
3839
(test-utils/teardown-test-project project))))

src/test/clojure/com/github/clojure_lsp/intellij/test_utils.clj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
[action-id project]
3333
(let [action (.getAction (ActionManager/getInstance) action-id)
3434
context (.getDataContext (DataManager/getInstance))]
35-
(println "Running action:" action-id)
3635
(app-manager/write-command-action
3736
project
3837
(fn []
@@ -76,18 +75,18 @@
7675
([project-name]
7776
(setup-test-project project-name "{}"))
7877
([project-name deps-content]
79-
(let [fixture (clj4intellij.test/setup project-name)
80-
deps-file (.createFile fixture "deps.edn" deps-content)
81-
_ (.setTestDataPath fixture "testdata")
82-
project (.getProject fixture)]
83-
{:fixture fixture
78+
(let [fixtures (clj4intellij.test/setup project-name)
79+
deps-file (.createFile fixtures "deps.edn" deps-content)
80+
_ (.setTestDataPath fixtures "testdata")
81+
project (.getProject fixtures)]
82+
{:fixtures fixtures
8483
:project project
8584
:deps-file deps-file})))
8685

8786
(defn setup-lsp-server
8887
"Sets up and waits for the LSP server to be ready."
8988
[project]
90-
(let [my-settings (ServiceManager/getService SettingsState)]
89+
(let [my-settings ^SettingsState (ServiceManager/getService SettingsState)]
9190
(.loadState my-settings my-settings)
9291
(clj4intellij.test/dispatch-all)
9392
(wait-lsp-start {:project project})))

0 commit comments

Comments
 (0)