1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Isolate the find integration tests

To avoid being able to introduce dependencies between tests this commit
makes sure that we close the document between tests so that we can't
accidentally rely on state set by a previous test.
This commit is contained in:
Tim van der Meij 2025-04-13 14:14:19 +02:00
parent 179859f54a
commit f043760b54
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762

View file

@ -28,11 +28,11 @@ describe("find bar", () => {
describe("highlight all", () => {
let pages;
beforeAll(async () => {
beforeEach(async () => {
pages = await loadAndWait("find_all.pdf", ".textLayer", 100);
});
afterAll(async () => {
afterEach(async () => {
await closePages(pages);
});
@ -89,11 +89,11 @@ describe("find bar", () => {
describe("highlight all (XFA)", () => {
let pages;
beforeAll(async () => {
beforeEach(async () => {
pages = await loadAndWait("xfa_imm5257e.pdf", ".xfaLayer");
});
afterAll(async () => {
afterEach(async () => {
await closePages(pages);
});
@ -130,11 +130,11 @@ describe("find bar", () => {
describe("issue19207.pdf", () => {
let pages;
beforeAll(async () => {
beforeEach(async () => {
pages = await loadAndWait("issue19207.pdf", ".textLayer", 200);
});
afterAll(async () => {
afterEach(async () => {
await closePages(pages);
});