Skip to content

Commit

Permalink
modified unit test and isDefined
Browse files Browse the repository at this point in the history
  • Loading branch information
nimjetushar committed Jan 27, 2020
1 parent 4c73a84 commit 8163f4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions __test__/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@ import {
hasKey
} from "../index";

const utils = require('../build/utils');

describe("Utils", () => {
it("should have isArray method", () => {
expect(isArray).toBeDefined();
expect(utils.isArray).toBeDefined();
});

it("should have createMap method", () => {
expect(createMap).toBeDefined();
expect(utils.createMap).toBeDefined();
});

it("should have deepCopy method", () => {
expect(deepCopy).toBeDefined();
expect(utils.deepCopy).toBeDefined();
});

it("should have isBoolean method", () => {
Expand Down
2 changes: 1 addition & 1 deletion core/isDefined.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function isDefined(data) {
return !(data === null || data === undefined || data === "");
return !(data == null || data === "");
}

export { isDefined };

0 comments on commit 8163f4d

Please sign in to comment.