Problems with some tests
jafingerhut opened this issue · comments
File: test/plumbing/core_test.cljx
Spurious + at the end of this line: (is (thrown? Exception (p/safe-get {:a 2} :b)))+
Appears to be misplaced parens in this test:
- (is (= {:foo 2 :bar 1})
-
(p/update-in-when {:foo 1 :bar 1} [:foo] inc))
- (is (= {:foo 2 :bar 1}
-
(p/update-in-when {:foo 1 :bar 1} [:foo] inc)))
This test doesn't test anything, because (= x) is always true. Maybe it is intended to compare @called? to true?
(is (= @called?))
File: test/plumbing/map_test.cljx
These lines always return true because the number 2 is always truthy:
(is 2 (= (map/update-key! m :a inc)))
(is 2 (= (map/update-key! m :c conj "foo")))
It isn't obvious to me what the correct tests are yet, since at least with today's code the update-key! calls do not return 2.
Found using Eastwood lint tool.
Thanks! Sounds like we should look into Eastwood again.
A warning: my testing has uncovered a bug in Eastwood that causes it to throw an exception during linting of your core_test.clj file. This should be fixed in the next 0.1.5 release of Eastwood, probably ready to come out in a week or two. I haven't tested older versions of Eastwood on plumbing.