The electric automaker shares popped after it posted a surprise earnings beat.