Name anonymous functions supplied to Mocha

Naming these functions facilitates primitive debugging in cases where
stack traces are not available.