We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When the rules contain something like:
"bio": { ".validate": "newData.isString() && newData.val().length < 100" }
And testing with a write with "bio": "", targaryen throws an error:
"bio": ""
Error: newData.val().length < 100: Invalid < expression: Left and right sides types are differents.
If I test by having a non-empty string for bio, it works.
bio
The text was updated successfully, but these errors were encountered:
I will test that and try to fix it this weekend, unless someone tackles it first.
Sorry, something went wrong.
Here is the test:
./bin/targaryen-specs -a '{"tests": [{ > "rule": "root.child(\"foo\").val().length < 100", > "data": {"foo": ""} > }]}'
Output:
{ Error: Targaryen and Firebase evaluation of "root.child("foo").val().length < 100" diverges. spec: RuleSpec { rule: 'root.child("foo").val().length < 100', user: 'unauth', wildchildren: undefined, data: { foo: '' }, isValid: true, failAtRuntime: false, evaluateTo: true }, targaryen: { isValid: true, failAtRuntime: true, evaluateTo: undefined } }
test(e2e): add test for goldibex#125
9ace83c
9229e7c
Merge pull request #126 from dinoboff/fix/125
8aa675c
WIP: fix #125
@SamyPesse Thanks finding the bug and reporting it. I will release the 3.0.2 this weekend.
@SamyPesse Released (sorry for the delay).
No branches or pull requests
When the rules contain something like:
And testing with a write with
"bio": ""
, targaryen throws an error:If I test by having a non-empty string for
bio
, it works.The text was updated successfully, but these errors were encountered: