adding before hook to --bail test