Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core-webhooks): cast params in condition checks #2887

Merged
merged 5 commits into from
Aug 23, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor(core-webhooks): replace null with undefined (codacy)
  • Loading branch information
dated committed Aug 23, 2019
commit 800d8043d11eb5126bbf0f28726e810d3b614ac3
16 changes: 8 additions & 8 deletions __tests__/unit/core-webhooks/conditions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ describe("Conditions - greater than", () => {
expect(gt(1, 2)).toBeFalse();
expect(gt("1", "2")).toBeFalse();
expect(gt("2", "10")).toBeFalse();
expect(gt(null, NaN)).toBeFalse();
expect(gt(undefined, NaN)).toBeFalse();
expect(gt(1, NaN)).toBeFalse();
expect(gt(null, 1)).toBeFalse();
expect(gt(undefined, 1)).toBeFalse();
expect(gt("null", "NaN")).toBeFalse();
expect(gt("1", "NaN")).toBeFalse();
expect(gt("null", "1")).toBeFalse();
Expand All @@ -113,9 +113,9 @@ describe("Conditions - greater than or equal", () => {
it("should be false", () => {
expect(gte(1, 2)).toBeFalse();
expect(gte("1", "2")).toBeFalse();
expect(gt(null, NaN)).toBeFalse();
expect(gt(undefined, NaN)).toBeFalse();
expect(gt(1, NaN)).toBeFalse();
expect(gt(null, 1)).toBeFalse();
expect(gt(undefined, 1)).toBeFalse();
expect(gt("null", "NaN")).toBeFalse();
expect(gt("1", "NaN")).toBeFalse();
expect(gt("null", "1")).toBeFalse();
Expand All @@ -131,9 +131,9 @@ describe("Conditions - less than", () => {
it("should be false", () => {
expect(lt(2, 1)).toBeFalse();
expect(lt("2", "1")).toBeFalse();
expect(gt(null, NaN)).toBeFalse();
expect(gt(undefined, NaN)).toBeFalse();
expect(gt(1, NaN)).toBeFalse();
expect(gt(null, 1)).toBeFalse();
expect(gt(undefined, 1)).toBeFalse();
expect(gt("null", "NaN")).toBeFalse();
expect(gt("1", "NaN")).toBeFalse();
expect(gt("null", "1")).toBeFalse();
Expand All @@ -151,9 +151,9 @@ describe("Conditions - less than or equal", () => {
it("should be false", () => {
expect(lte(2, 1)).toBeFalse();
expect(lte("2", "1")).toBeFalse();
expect(gt(null, NaN)).toBeFalse();
expect(gt(undefined, NaN)).toBeFalse();
expect(gt(1, NaN)).toBeFalse();
expect(gt(null, 1)).toBeFalse();
expect(gt(undefined, 1)).toBeFalse();
expect(gt("null", "NaN")).toBeFalse();
expect(gt("1", "NaN")).toBeFalse();
expect(gt("null", "1")).toBeFalse();
Expand Down