Yes, but sometimes a lot slower than they’ll go otherwise. Boards with belt-drive motors have a reputation for handling uphill better than those with hub-mounted motors because they have higher gear ratios.
The hub motor is stuck at a 1:1 gear ratio by design, so it can’t compensate for a situation that demands more torque to maintain velocity. In testing, this checked out.