mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Isolate the copy/paste 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:
parent
0e9e4ec64f
commit
179859f54a
1 changed files with 4 additions and 4 deletions
|
@ -40,12 +40,12 @@ describe("Copy and paste", () => {
|
|||
describe("all text", () => {
|
||||
let pages;
|
||||
|
||||
beforeAll(async () => {
|
||||
beforeEach(async () => {
|
||||
pages = await loadAndWait("tracemonkey.pdf", "#hiddenCopyElement", 100);
|
||||
await mockClipboard(pages);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
afterEach(async () => {
|
||||
await closePages(pages);
|
||||
});
|
||||
|
||||
|
@ -137,7 +137,7 @@ describe("Copy and paste", () => {
|
|||
describe("Copy/paste and ligatures", () => {
|
||||
let pages;
|
||||
|
||||
beforeAll(async () => {
|
||||
beforeEach(async () => {
|
||||
pages = await loadAndWait(
|
||||
"copy_paste_ligatures.pdf",
|
||||
"#hiddenCopyElement",
|
||||
|
@ -146,7 +146,7 @@ describe("Copy and paste", () => {
|
|||
await mockClipboard(pages);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
afterEach(async () => {
|
||||
await closePages(pages);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue