mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-05-31 07:11:00 +02:00
Merge pull request #21323 from Snuffleupagus/integration-test-more-fromBase64
Use `Uint8Array.fromBase64` in the `test/integration/highlight_editor_spec.mjs` file
This commit is contained in:
commit
4daca805d6
@ -2271,9 +2271,7 @@ describe("Highlight Editor", () => {
|
||||
const pdfData = fs.readFileSync(pdfPath).toString("base64");
|
||||
const dataTransfer = await page.evaluateHandle(data => {
|
||||
const transfer = new DataTransfer();
|
||||
const view = Uint8Array.from(atob(data), code =>
|
||||
code.charCodeAt(0)
|
||||
);
|
||||
const view = Uint8Array.fromBase64(data);
|
||||
const file = new File([view], "basicapi.pdf", {
|
||||
type: "application/pdf",
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user