Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Fix TestData.ifMatch rule matching #259

Closed
wants to merge 5 commits into from

Conversation

LiamMorrow
Copy link

@LiamMorrow LiamMorrow commented Sep 5, 2022

The rule was not matching, after debugging it was found that the expected rule operator field was named op not operator. This was found by debugging until getting to the matchFn function in evaluator.js.

There was also another issue where updating when using an ifMatch resulted in a JSON ref error. Replaced JSON based copy with manual copy.
Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues
#258

Describe the solution you've provided
This PR fixes the JSON circular ref by using a manual copy method in TestDataRuleBuilder rather than using JSON.stringify.
It fixes the rules not matching by using op rather than operator when using TestDataRuleBuilder.andMatch

The rule was not matching, after debugging it was found that the expected rule operator field
was named `op` not `operator`. This was found by debugging until getting to the matchFn function in
evaluator.js.

There was also another issue where updating when using an ifMatch resulted in a JSON ref error.  Replaced JSON based copy with manual copy:
@kinyoklion kinyoklion changed the base branch from main to contrib September 6, 2022 18:11
LaunchDarklyReleaseBot pushed a commit that referenced this pull request Sep 6, 2022
…dardize-relay-proxy-in-daemon-mode-in

Adds link to Relay Proxy docs
@kinyoklion
Copy link
Member

Released in 6.4.3.

Thank you!

@kinyoklion kinyoklion closed this Sep 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants