Skip to content

test: return frozen function from common.must[Not]Call

I wonder if it would make sense to return frozen functions from mustCall(), mustCallAtLeast(), mustNotCall() and mustSucceed().

Pros: implicit check that functions are never mutated, with no code cost.

Cons: impossible to monkey-patch them in tests.

Merge request reports

Loading