Skip to content

Commit

Permalink
fixup! add integration tests and mark unit test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
ryzokuken committed Jan 11, 2025
1 parent feee429 commit d33ea72
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/integration/autolinker_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ describe("autolinker", function () {
const url = await page.$$eval(".annotationLayer a", annotations =>
annotations.map(a => a.href)
);
expect(url.length).toEqual(1);
expect(url[0]).toEqual("http://www.mozilla.org/");
expect(url.length).withContext(`In ${browserName}`).toEqual(1);
expect(url[0])
.withContext(`In ${browserName}`)
.toEqual("http://www.mozilla.org/");
})
);
});
Expand All @@ -57,8 +59,12 @@ describe("autolinker", function () {
const links = await page.$$eval(".annotationLayer a", annotations =>
annotations.map(a => a.getAttribute("data-element-id"))
);
expect(links.length).toEqual(3);
links.forEach(link => expect(link).not.toEqual("undefined"));
expect(links.length).withContext(`In ${browserName}`).toEqual(3);
links.forEach(link =>
expect(link)
.withContext(`In ${browserName}`)
.not.toEqual("undefined")
);
})
);
});
Expand Down

0 comments on commit d33ea72

Please sign in to comment.