mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #14598 from Snuffleupagus/rm-isBool
Re-factor the `Catalog.viewerPreferences` method and remove the `isBool` helper function
This commit is contained in:
commit
2bb96a708c
4 changed files with 68 additions and 104 deletions
|
@ -21,7 +21,6 @@ import {
|
|||
getModificationDate,
|
||||
isArrayBuffer,
|
||||
isAscii,
|
||||
isBool,
|
||||
isSameOrigin,
|
||||
isString,
|
||||
string32,
|
||||
|
@ -74,22 +73,6 @@ describe("util", function () {
|
|||
});
|
||||
});
|
||||
|
||||
describe("isBool", function () {
|
||||
it("handles boolean values", function () {
|
||||
expect(isBool(true)).toEqual(true);
|
||||
expect(isBool(false)).toEqual(true);
|
||||
});
|
||||
|
||||
it("handles non-boolean values", function () {
|
||||
expect(isBool("true")).toEqual(false);
|
||||
expect(isBool("false")).toEqual(false);
|
||||
expect(isBool(1)).toEqual(false);
|
||||
expect(isBool(0)).toEqual(false);
|
||||
expect(isBool(null)).toEqual(false);
|
||||
expect(isBool(undefined)).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("isString", function () {
|
||||
it("handles string values", function () {
|
||||
expect(isString("foo")).toEqual(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue