Skip to content

Commit

Permalink
Dev (#153)
Browse files Browse the repository at this point in the history
* fix isFalsyExtended

* fixed tests
  • Loading branch information
m10rten authored Apr 22, 2023
1 parent f842a3c commit f08fbfb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
16 changes: 8 additions & 8 deletions tests/types/isFalsyExtended.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ describe("isFalsyExtended", () => {
it("should return false for {a:1}", () => {
expect(isFalsyExtended({ a: 1 })).toBe(false);
});
it("should return true for [{},{}]", () => {
expect(isFalsyExtended([{}, {}])).toBe(true);
it("should return false for [{},{}]", () => {
expect(isFalsyExtended([{}, {}])).toBe(false);
});
it("should return false for [{a:1},{b:2}]", () => {
expect(isFalsyExtended([{ a: 1 }, { b: 2 }])).toBe(false);
});
it("should return true for [{a:1},{b:2},null]", () => {
expect(isFalsyExtended([{ a: 1 }, { b: 2 }, null])).toBe(true);
it("should return false for [{a:1},{b:2},null]", () => {
expect(isFalsyExtended([{ a: 1 }, { b: 2 }, null])).toBe(false);
});
it("should return true for [{a:1},{b:2},undefined]", () => {
expect(isFalsyExtended([{ a: 1 }, { b: 2 }, undefined])).toBe(true);
it("should return false for [{a:1},{b:2},undefined]", () => {
expect(isFalsyExtended([{ a: 1 }, { b: 2 }, undefined])).toBe(false);
});
it("should return true for [{a:1},{b:2},NaN]", () => {
expect(isFalsyExtended([{ a: 1 }, { b: 2 }, NaN])).toBe(true);
it("should return false for [{a:1},{b:2},NaN]", () => {
expect(isFalsyExtended([{ a: 1 }, { b: 2 }, NaN])).toBe(false);
});
it("should return true for () => {}", () => {
expect(isFalsyExtended(() => {})).toBe(true);
Expand Down
10 changes: 2 additions & 8 deletions tests/types/isTruthyExtended.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,10 @@ describe("isTruthyExtended", () => {
it("should return true for {a:1}", () => {
expect(isTruthyExtended({ a: 1 })).toBe(true);
});
it("should return false for [{},{}]", () => {
expect(isTruthyExtended([{}, {}])).toBe(false);
it("should return true for [{},{}]", () => {
expect(isTruthyExtended([{}, {}])).toBe(true);
});
it("should return true for [{a:1},{b:2}]", () => {
expect(isTruthyExtended([{ a: 1 }, { b: 2 }])).toBe(true);
});
it("should return false for [{a:1},{b:2},null]", () => {
expect(isTruthyExtended([{ a: 1 }, { b: 2 }, null])).toBe(false);
});
it("should return true for [{a:1},{b:2},undefined]", () => {
expect(isTruthyExtended([{ a: 1 }, { b: 2 }, undefined])).toBe(false);
});
});

0 comments on commit f08fbfb

Please sign in to comment.