mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Move the isEmptyObj
helper function from src/shared/util.js
to test/unit/test_utils.js
Since this helper function is no longer used anywhere in the main code-base, but only in a couple of unit-tests, it's thus being moved to a more appropriate spot. Finally, the implementation of `isEmptyObj` is also tweaked slightly by removing the manual loop.
This commit is contained in:
parent
159e13c4e4
commit
88fdb482b0
4 changed files with 10 additions and 20 deletions
|
@ -19,7 +19,6 @@ import {
|
|||
createValidAbsoluteUrl,
|
||||
isArrayBuffer,
|
||||
isBool,
|
||||
isEmptyObj,
|
||||
isNum,
|
||||
isSameOrigin,
|
||||
isString,
|
||||
|
@ -89,16 +88,6 @@ describe("util", function () {
|
|||
});
|
||||
});
|
||||
|
||||
describe("isEmptyObj", function () {
|
||||
it("handles empty objects", function () {
|
||||
expect(isEmptyObj({})).toEqual(true);
|
||||
});
|
||||
|
||||
it("handles non-empty objects", function () {
|
||||
expect(isEmptyObj({ foo: "bar" })).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("isNum", function () {
|
||||
it("handles numeric values", function () {
|
||||
expect(isNum(1)).toEqual(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue