(cljs) is there a way to dynamically create test
s without macros? e.g. I have a vector of test data, and I want to deftest
for each so that they can fail independently. I looked into deftest
s source and it requires an interned var, which I can’t generate without macros afaik. Is there a better way to address this case?
looks like core.test doesn’t have a notion of a “skipped” test — do people just tend to comment things out?
@jaredly: I use (comment ...)
@jaredly: you want a different "The test failed" for each case in the test vector data?
If it's only a matter of display, you could overwrite cljs.test/report
to show the assertions differently.
@jaredly another option is that you could wrap your assertions with cljs.test/testing
for each element of the vector... You could even write your own test-ns-hook
and run the the way you want... It would be great if you could explain what do you want differently in the output so we can help you better.
thanks, that’s helpful. I had thought that a failing is
would short-circuit and break out of the deftest… but that’s not the case
If you want to have full control on how your tests run, test-ns-hook
is the way to go
good to know