File tree 2 files changed +12
-12
lines changed
src/test/clojure/com/github/clojure_lsp/intellij
2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 23
23
The test ensures that the Forward Slurp action correctly modifies the code structure
24
24
by moving the closing parenthesis forward."
25
25
(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" )]
28
28
(is (= project-name (.getName ^Project project)))
29
29
(is deps-file)
30
30
31
- (let [editor (test-utils/open-file-in-editor fixture clj-file)]
31
+ (let [editor (test-utils/open-file-in-editor fixtures clj-file)]
32
32
(test-utils/setup-lsp-server project)
33
33
(editor/move-caret-to-position editor 2 8 )
34
34
(test-utils/run-editor-action " ClojureLSP.ForwardSlurp" project)
35
35
(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
+
38
39
(test-utils/teardown-test-project project))))
Original file line number Diff line number Diff line change 32
32
[action-id project]
33
33
(let [action (.getAction (ActionManager/getInstance ) action-id)
34
34
context (.getDataContext (DataManager/getInstance ))]
35
- (println " Running action:" action-id)
36
35
(app-manager/write-command-action
37
36
project
38
37
(fn []
76
75
([project-name]
77
76
(setup-test-project project-name " {}" ))
78
77
([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
84
83
:project project
85
84
:deps-file deps-file})))
86
85
87
86
(defn setup-lsp-server
88
87
" Sets up and waits for the LSP server to be ready."
89
88
[project]
90
- (let [my-settings (ServiceManager/getService SettingsState)]
89
+ (let [my-settings ^SettingsState (ServiceManager/getService SettingsState)]
91
90
(.loadState my-settings my-settings)
92
91
(clj4intellij.test/dispatch-all )
93
92
(wait-lsp-start {:project project})))
You can’t perform that action at this time.
0 commit comments