You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(operators): add follow-up error scenarios for operator null-return behaviour
Covers the remaining cases from open-feature/flagd#1874
identified in the review of #342:
- starts_with / ends_with: non-string first argument → must return null
- starts_with / ends_with: wrong argument count → must return null
- sem_ver: wrong argument count (missing target version) → must return null
- fractional: all-zero bucket weights (no bucket matched) → must return null
- fractional: negative bucket weight clamped to zero → "one" gets effective
weight 0, "two" gets 100% of the weight
All scenarios use a bare operator as the targeting expression (not wrapped in
'if') so a null result selects the defaultVariant directly. Scenarios are
tagged @operator-errors and mirrored in both the SDK-level gherkin
(gherkin/targeting.feature) and the evaluator-level gherkin files
(evaluator/gherkin/{string,semver,fractional}.feature) with matching flag
definitions added to both flags/edge-case-flags.json and
evaluator/flags/testkit-flags.json.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
0 commit comments