You can use the let statement with the wait. Maybe something like this will do your job (unverified pseudo-code):
(expect
(let [dataset {val: "original values"}]
(function-to-be-tested val:))
expected-return-value)
This real code works out of the box to show the principle:
(expect (let [ar [1 2 3]]
(first ar)) 2)
It returns the following error message as expected:
failure in (core_test.clj:9) : image-lib.core-test
(expect (let [ar [1 2 3]] (first ar)) 2)
expected: 1
was: 2
Ran 2 tests containing 2 assertions in 17 msecs
1 failures, 0 errors.
Tests completed at 10:59:45.435
source
share