From 0e9e4ec64fd2ce70712a20dbf6c5ea6da12aa7ac Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sun, 13 Apr 2025 14:13:39 +0200 Subject: [PATCH] Isolate the caret browsing 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. --- test/integration/caret_browsing_spec.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/caret_browsing_spec.mjs b/test/integration/caret_browsing_spec.mjs index b6247f1ce..33fb59774 100644 --- a/test/integration/caret_browsing_spec.mjs +++ b/test/integration/caret_browsing_spec.mjs @@ -27,11 +27,11 @@ describe("Caret browsing", () => { describe("Selection", () => { let pages; - beforeAll(async () => { + beforeEach(async () => { pages = await loadAndWait("tracemonkey.pdf", ".textLayer .endOfContent"); }); - afterAll(async () => { + afterEach(async () => { await closePages(pages); });