|
1 | 1 | (ns refactor-nrepl.integration-tests
|
2 |
| - (:require [clojure.test :refer [deftest is use-fixtures]] |
| 2 | + (:require [clojure.test :refer [deftest is use-fixtures testing]] |
3 | 3 | [nrepl.server :as nrepl]
|
4 | 4 | [refactor-nrepl middleware
|
5 | 5 | [analyzer :as analyzer]
|
|
36 | 36 | :line 6 :column 19
|
37 | 37 | :name "foo" :dir test-project-dir)
|
38 | 38 | result (remove keyword? response)]
|
| 39 | + (testing (pr-str result) |
| 40 | + (is (= 3 (count result)) (format "expected 3 results but got %d" (count result))) |
| 41 | + (is (every? (partial re-matches #"(?s).*(one|two)\.clj.*") result) "one.clj or two.clj not found in result") |
39 | 42 |
|
40 |
| - (is (= 3 (count result)) (format "expected 3 results but got %d" (count result))) |
41 |
| - (is (every? (partial re-matches #"(?s).*(one|two)\.clj.*") result) "one.clj or two.clj not found in result") |
42 |
| - |
43 |
| - (is (some (partial re-matches #"(?s).*one.clj \[2\].*") result) "call of foo not found in ns com.example.one") |
| 43 | + (is (some (partial re-matches #"(?s).*one.clj \[2\].*") result) "call of foo not found in ns com.example.one") |
44 | 44 |
|
45 |
| - (is (some (partial re-matches #"(?s).*one.clj \[6\].*") result) "call of foo not found in ns com.example.one") |
| 45 | + (is (some (partial re-matches #"(?s).*one.clj \[6\].*") result) "call of foo not found in ns com.example.one") |
46 | 46 |
|
47 |
| - (is (some (partial re-matches #"(?s).*two.clj \[3\].*") result) "def of foo not found in ns com.example.two"))) |
| 47 | + (is (some (partial re-matches #"(?s).*two.clj \[3\].*") result) "def of foo not found in ns com.example.two")))) |
48 | 48 |
|
49 | 49 | (defn ns-ast-throw-error-for-five [^String content]
|
50 | 50 | (if (.contains content "com.example.five")
|
|
60 | 60 | :name "foo" :dir test-project-dir)
|
61 | 61 | result (remove keyword? response)]
|
62 | 62 |
|
63 |
| - (is (= 3 (count result)) (format "expected 3 results but got %d" (count result))) |
64 |
| - (is (every? (partial re-matches #"(?s).*(one|two)\.clj.*") result) "one.clj or two.clj not found in result") |
| 63 | + (testing (pr-str result) |
65 | 64 |
|
66 |
| - (is (some (partial re-matches #"(?s).*one.clj \[2\].*") result) "call of foo not found in ns com.example.one") |
| 65 | + (is (= 3 (count result)) (format "expected 3 results but got %d" (count result))) |
| 66 | + (is (every? (partial re-matches #"(?s).*(one|two)\.clj.*") result) "one.clj or two.clj not found in result") |
67 | 67 |
|
68 |
| - (is (some (partial re-matches #"(?s).*one.clj \[6\].*") result) "call of foo not found in ns com.example.one") |
| 68 | + (is (some (partial re-matches #"(?s).*one.clj \[2\].*") result) "call of foo not found in ns com.example.one") |
69 | 69 |
|
70 |
| - (is (some (partial re-matches #"(?s).*two.clj \[3\].*") result) "def of foo not found in ns com.example.two")))) |
| 70 | + (is (some (partial re-matches #"(?s).*one.clj \[6\].*") result) "call of foo not found in ns com.example.one") |
| 71 | + |
| 72 | + (is (some (partial re-matches #"(?s).*two.clj \[3\].*") result) "def of foo not found in ns com.example.two"))))) |
71 | 73 |
|
72 | 74 | (deftest test-shouldnt-find-str-in-assert
|
73 | 75 | (let [transport (connect :port 7777)
|
|
0 commit comments