If you have a block like this:
const FOO = "BAR";
check(thing, function(thing) {
thing == FOO;
});
You'll get an error that FOO is not defined. This can make it awkward to refer to constants or other useful local variables inside check tests.
Note: I've shown the FOO variable being very close to the comparison function, but it would probably be higher up (at the top of the file or in a beforeEach block) in a real example.