Skip to content

Commit

Permalink
Merge pull request #53 from rtablada/better-results
Browse files Browse the repository at this point in the history
Better assertion logging
  • Loading branch information
NullVoxPopuli authored Nov 11, 2024
2 parents bc56c9c + 70fb5dc commit 2acdd44
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test-support/src/routing/visit-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ export async function visitAllLinks(
debugAssert(`link exists via selector \`${toVisit.selector}\``, link);

await click(link);
assert.ok(
currentURL().startsWith(toVisit.href),
`Navigation was successful: to:${toVisit.original}, from:${returnTo}`,
);
assert.pushResult({
result: currentURL().startsWith(toVisit.href),
actual: currentURL(),
expected: toVisit.href,
message: `Navigation was successful: to:${toVisit.original}, from:${returnTo}`,
});
visited.add(key);

if (callback) {
Expand Down

0 comments on commit 2acdd44

Please sign in to comment.