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

conditionsMeet fails on array of numbers #20

Closed
mrclay opened this issue Feb 15, 2018 · 3 comments
Closed

conditionsMeet fails on array of numbers #20

mrclay opened this issue Feb 15, 2018 · 3 comments

Comments

@mrclay
Copy link
Contributor

mrclay commented Feb 15, 2018

See #18, although its patch doesn't fix this this.

// throws error
test("handles array of non-objects", () => {
  let condition = {
    options: {
      contains: 2,
    },
  };
  expect(conditionsMeet(condition, { options: [1] })).toBeFalsy();
  expect(conditionsMeet(condition, { options: [] })).toBeFalsy();
  expect(conditionsMeet(condition, { options: [1, 2] })).toBeTruthy();
});
@mavarazy
Copy link
Contributor

mavarazy commented Feb 16, 2018

@mrclay thank you for your support, I've fixed the issue, now it works in both cases.
I've published patched version to NPM

@mrclay
Copy link
Contributor Author

mrclay commented Feb 16, 2018

@mavarazy any chance you'll publish 0.1.16 anytime soon? I'm not seeing it.

@mavarazy
Copy link
Contributor

@mrclay it's in 0.1.15 I've published yesterday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants