Use let to remove duplication from tests