Closed Andrewwelton closed 3 years ago
Thanks for the feedback @calvis I'll make the changes you suggested :)
Merging #61 (c09aa79) into main (6fe01e6) will increase coverage by
0.07%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #61 +/- ##
==========================================
+ Coverage 98.76% 98.83% +0.07%
==========================================
Files 2 2
Lines 81 86 +5
Branches 1 1
==========================================
+ Hits 80 85 +5
Partials 1 1
Impacted Files | Coverage Δ | |
---|---|---|
src/bond/assertions.clj | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 6fe01e6...c09aa79. Read the comment docs.
sorry was on vacation - i think the change to the implementation of called-once-with-args?
still needs to happen, to drop the unnecessary call to called-times?
, otherwise LGTM
sorry was on vacation - i think the change to the implementation of
called-once-with-args?
still needs to happen, to drop the unnecessary call tocalled-times?
, otherwise LGTM
Thanks! I'll make that change shortly!
On insights we noticed that the assertions available were often not flexible enough for us, and
called-with-args
is confusing without inspecting the source, and not useful on functions that are called many times through the course of a test (tracing/
methods, for example).This adds
called-once-with-args
which we've written and use on Insights. We recognize that the same effect can be achieved withcalled-with-args
and only providing the set of args we expect, but we've found the name and behaviour of the function confusing.This also adds
called-at-least-once-with-args?
which is what we had expectedcalled-with-args
to be. This checks that thef
provided was called with the provided arguments at least once.I'd like to propose changing the
called-with-args
doc string to be more explicit about where and how it should be used, but wanted to propose this as a solution on it's own first.