mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-11 12:41:03 +02:00
Use Uint8Array.fromBase64 in the test/integration/highlight_editor_spec.mjs file
This commit is contained in:
parent
ea18e73de2
commit
057507f6ce
@ -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