open-feature / open-feature/flagd-testbed
Add smoke tests for standard JSON Logic operators
Open
Nobody has claimed this yet.
- Dominant language
- Gherkin
- Stars
- 5
- Forks
- 14
- Avg merge
- 3h 17m
- Merged PRs (30d)
- 13
Description
We test custom operators (fractional, sem_ver, starts_with, ends_with) but have no isolated coverage for standard JSON Logic operators. Adding thin smoke tests would catch regressions during library upgrades.
Approach
- New files:
evaluator/gherkin/jsonlogic-operators.feature+evaluator/flags/jsonlogic-operators-flags.json - Tag:
@jsonlogic-operators - Each flag wraps the operator in
if/==to select a variant; assertions are on resolved variant values only - One or two cases per operator; not exhaustive
Operators
- Equality:
==,!= - Comparison:
>,<,>=,<= - Logic:
and,or,!,!! - Arithmetic:
+,-,*,/,% - String:
cat,substr,in(substring) - Array:
in(membership) - Control:
if,missing,missing_some
Coercion cases
"1" == 1(string/number)"2" > 1(string in comparison)!!""vs!!"hello"(truthy/falsy)+ "3"(unary plus coercion)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing custom-operator coverage, then add the tagged cases in evaluator/gherkin/jsonlogic-operators.feature and matching flags in evaluator/flags/jsonlogic-operators-flags.json. Run the evaluator's Gherkin tests and confirm each listed standard operator, including the coercion cases, resolves to the expected variant values.
Written by the indexing model from the issue text.
Assessment
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100