Test to verify correct set of nodes are visited to get shortest path in shortestPathTo
Visit nodes in order of their tentative distance value.
Ignore nodes in priority queue if already visited.
(code formatting)