Skip to content

Add tests of QueryTreeDataProvider#2444

Merged
robertbrignull merged 2 commits intomainfrom
robertbrignull/QueryTreeDataProvider-tests
May 24, 2023
Merged

Add tests of QueryTreeDataProvider#2444
robertbrignull merged 2 commits intomainfrom
robertbrignull/QueryTreeDataProvider-tests

Conversation

@robertbrignull
Copy link
Copy Markdown
Contributor

This PR adds tests of the QueryTreeDataProvider class.

I investigated if we could make these unit tests rather than integration tests, but sadly it proved too complicated and not worth it for the benefit it gives.

To make this easier, I introduced a new QueryDiscoverer interface which allows us to easily instantiate QueryTreeDataProvider in the tests without dealing with the more complicated QueryDiscovery class and without Jest mocking. Do you think this interface is helpful and worth it? Suggestions on naming welcome?

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@robertbrignull robertbrignull requested a review from a team May 24, 2023 10:45
@robertbrignull robertbrignull requested a review from a team as a code owner May 24, 2023 10:45
Copy link
Copy Markdown
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, tests looks good! 🧪

I don't fully understand the QueryDiscoverer class, but if it makes things easier then that's fine 😅

@robertbrignull robertbrignull merged commit ff88a8d into main May 24, 2023
@robertbrignull robertbrignull deleted the robertbrignull/QueryTreeDataProvider-tests branch May 24, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants