add `spec-assertion-thrown?` test declaration
thumbnail opened this issue · 1 comments
thumbnail commented
Problem statement
spec-assertion-thrown?
is a assert-expr symbol, not a function. So it misses highlighting and a proper refer.
This has a couple of caveats:
- editors can't show arglist
- lack of traceability. The assert-expr is registered when
speced.def
is loaded, which might be in a different ns - formatters might remove
[nedap.speced.def]
as a dependency, if it is only loaded for registering thespec-assertion-thrown?
-matcher.
Proposal
add test
-ns with a declaration for the assert-expression. Similar to matcher-combinators:
https://github.com/nubank/matcher-combinators/blob/b3da18923f0aa6a5ef924e9303f690a3efa1d978/src/cljc/matcher_combinators/test.cljc#L10-L11
vemv commented
SGTM, it's not perfect but I see the benefits. One could even go furher and add doc
metadata to the declare
which would be another benefit.