Missing semi-colon
Changed assertion line for checking if method is undefined