Erlang’s eunit. They call it “lazy generators”.
https://www.erlang.org/doc/apps/eunit/chapter.html#Lazy_generators