Skip to content

Commit

Permalink
Enable the 'gets PDF filename from query string appended to "blob:" U…
Browse files Browse the repository at this point in the history
…RL' unit-test in Node.js

The necessary functionality has been supported in Node.js for quite some time now, please see:
 - https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#browser_compatibility
 - https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL_static#browser_compatibility
  • Loading branch information
Snuffleupagus committed Nov 2, 2024
1 parent cf3ca8b commit 15fbee1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/unit/display_utils_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
* limitations under the License.
*/

import { bytesToString, isNodeJS } from "../../src/shared/util.js";
import {
getFilenameFromUrl,
getPdfFilenameFromUrl,
isValidFetchUrl,
PDFDateString,
} from "../../src/display/display_utils.js";
import { bytesToString } from "../../src/shared/util.js";

describe("display_utils", function () {
describe("getFilenameFromUrl", function () {
Expand Down Expand Up @@ -168,9 +168,6 @@ describe("display_utils", function () {
});

it('gets PDF filename from query string appended to "blob:" URL', function () {
if (isNodeJS) {
pending("Blob in not supported in Node.js.");
}
const typedArray = new Uint8Array([1, 2, 3, 4, 5]);
const blobUrl = URL.createObjectURL(
new Blob([typedArray], { type: "application/pdf" })
Expand Down

0 comments on commit 15fbee1

Please sign in to comment.