File tree 5 files changed +25
-7
lines changed
5 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 6
6
7
7
## Changed
8
8
9
+ - Built in plugins in the ` kaocha.plugin ` can now be specified as simple (rather
10
+ than namespaced) keywords.
11
+
9
12
# 0.0-389 (2019-01-29 / 152db39)
10
13
11
14
## Added
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ and source paths. Optionally set a reporter or load plugins.
142
142
:source-paths [" src" ]
143
143
:ns-patterns [" -test$" ]}]
144
144
; ; :reporter kaocha.report.progress/progress
145
- ; ; :plugins [:kaocha.plugin/ profiling :kaocha.plugin/ notifier]
145
+ ; ; :plugins [:profiling :notifier]
146
146
}
147
147
```
148
148
Original file line number Diff line number Diff line change 36
36
- [ ] Output reporter output to file (?)
37
37
38
38
** Plugin ideas
39
- - [ ] Provide inspect plugin with e.g. --print-test-ids
40
39
- [ ] Timing info of config/load/run steps
41
- - [ ] Provide extra dynamic var bindings
42
- - [X] Global pre/post hooks
43
40
- [ ] test.check configuration
44
41
- [ ] Detect side effects (see circleci.test)
45
42
51
48
52
49
** ClojureScript
53
50
- [ ] file/line not (always) correct
54
- - [ ] need to manually add test dir to classpath
55
- - [ ] automatically pick a free port for the websocket
51
+ - [ ] | need to manually add test dir to classpath
52
+ - [ ] | automatically pick a free port for the websocket
56
53
57
54
** JUnit.xml
58
- - [ ] Print non-leaf failures ([[https://github.com/lambdaisland/kaocha-junit-xml/issues/3][#1]])
59
55
60
56
** Internal
61
57
- [ ] Add smoke tests for all reporters and plugins (anything that is loaded conditionally)
72
68
- ::caputer/buffer
73
69
74
70
** Done
71
+ - [X] Print non-leaf failures ([[https://github.com/lambdaisland/kaocha-junit-xml/issues/3][#1]])
72
+ - [X] Provide inspect plugin with e.g. --print-test-ids
73
+ - [X] Provide extra dynamic var bindings
74
+ - [X] Global pre/post hooks
75
75
- [X] min/max clojure/java version
76
76
- [X] Run config hooks when doing --print-config
77
77
- [X] Define hooks directly in tests.edn
Original file line number Diff line number Diff line change 46
46
" (" (name (:kaocha.testable/type $)) " )" )}
47
47
$))))
48
48
49
+ (defn normalize-plugin-names [plugins]
50
+ (mapv (fn [p]
51
+ (cond
52
+ (qualified-keyword? p) p
53
+ (simple-keyword? p) (keyword " kaocha.plugin" (name p))
54
+ :else
55
+ (throw (ex-info " Plugin name must be a keyword" {:plugins plugins}))))
56
+ plugins))
57
+
49
58
(defn normalize [config]
50
59
(let [default-config (default-config )
51
60
{:keys [tests
Original file line number Diff line number Diff line change 69
69
(is (match? {:kaocha.testable/desc " foo (clojure.test)" }
70
70
(c/normalize-test-suite {:type :kaocha.type/clojure.test :id :foo })))))
71
71
72
+ (deftest normalize-plugin-names-test
73
+ (is (= [:kaocha.plugin/foo :foo/bar ]
74
+ (c/normalize-plugin-names [:foo :foo/bar ])))
75
+
76
+ (is (thrown? clojure.lang.ExceptionInfo (c/normalize-plugin-names '[foo]))))
77
+
72
78
(deftest normalize-test
73
79
(testing " normalizes keys"
74
80
(is (match? {:kaocha/color? false }
You can’t perform that action at this time.
0 commit comments