mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 09:08:07 +02:00
Merge pull request #17537 from Snuffleupagus/rm-isArrayBuffer
Remove the `isArrayBuffer` helper function
This commit is contained in:
commit
f8e3c79cb5
4 changed files with 10 additions and 35 deletions
|
@ -17,7 +17,6 @@ import {
|
|||
bytesToString,
|
||||
createValidAbsoluteUrl,
|
||||
getModificationDate,
|
||||
isArrayBuffer,
|
||||
PromiseCapability,
|
||||
string32,
|
||||
stringToBytes,
|
||||
|
@ -53,20 +52,6 @@ describe("util", function () {
|
|||
});
|
||||
});
|
||||
|
||||
describe("isArrayBuffer", function () {
|
||||
it("handles array buffer values", function () {
|
||||
expect(isArrayBuffer(new ArrayBuffer(0))).toEqual(true);
|
||||
expect(isArrayBuffer(new Uint8Array(0))).toEqual(true);
|
||||
});
|
||||
|
||||
it("handles non-array buffer values", function () {
|
||||
expect(isArrayBuffer("true")).toEqual(false);
|
||||
expect(isArrayBuffer(1)).toEqual(false);
|
||||
expect(isArrayBuffer(null)).toEqual(false);
|
||||
expect(isArrayBuffer(undefined)).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("string32", function () {
|
||||
it("converts unsigned 32-bit integers to strings", function () {
|
||||
expect(string32(0x74727565)).toEqual("true");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue