tests: remove extraneous anonymous function