Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
For non-seqable types, seq evals to object info when running tests
Key details
Description
Observing on master and 1.9.946, and as far back as 1.7.28:
If you do this in a REPL and call (test-seq) you will get the second test form throwing as expected:
Note that this also behaves properly if you are in a REPL and put this code in a namespace and load it via require while in the REPL:
Have src/foo/core.cljs containing
and then try it at the REPL:
If instead you drop the code (apart from the require form) into the bottom of the cljs.core-test namespace (or, the top of cljs.primitives-test) and run script/test-simple or script/test-self-parity you will see some concerning output. Also note the odd true and false return values.
A simpler case is (prn (seq #js {:a 1 :b 2})) which will print
Observing on master and 1.9.946, and as far back as 1.7.28:
If you do this in a REPL and call
(test-seq)
you will get the second test form throwing as expected:Note that this also behaves properly if you are in a REPL and put this code in a namespace and load it via
require
while in the REPL:Have
src/foo/core.cljs
containingand then try it at the REPL:
If instead you drop the code (apart from the
require
form) into the bottom of thecljs.core-test
namespace (or, the top ofcljs.primitives-test
) and runscript/test-simple
orscript/test-self-parity
you will see some concerning output. Also note the oddtrue
andfalse
return values.A simpler case is
(prn (seq #js {:a 1 :b 2}))
which will print.