Fix some comparisons#100
Conversation
and allow running from a local JSON file
It's hard to get something merged on the official repos because the original author does not work directly with this anymore. We have two options here:
I do prefer the second option because it would be much easier to merge this and create a new release. Also, thanks for the contrib. Very important to tackle the diffs between JS and GO. |
Thanks Diego, and I should have said up top, thank you for this library. Want me to rev this PR to make/use a stored-in-git copy of the (updated) tests.json file that's run as a new Test func, in addition to the existing HTTP-based test? |
|
Done! We run both test suites now |
|
Also commenting here: If y'all get additional test cases, please feel free to send them our way at https://github.com/orgs/json-logic so we can improve our test suite for cross-implementation compatibilty and vote (😄 Fortunately, it does look like JLE is compatible with these tests) Also @gburt if you want, I can also send you an invite to the org |
I noticed that
{"==": ["0", 0]}stopped returning true at some point, which is preventing us from upgrading. The JS library returns true for it. I noticed the official tests didn't exercise/test this. so I've opened a PR there to add a bunch more tests of various type-coerced comparisons.I also added the ability to run the tests with a local
tests.jsonfile which I used to fix those tests.