Functions for running "access path suggestions" queries#3294
Merged
shati-patel merged 2 commits intomainfrom Jan 31, 2024
Merged
Functions for running "access path suggestions" queries#3294shati-patel merged 2 commits intomainfrom
shati-patel merged 2 commits intomainfrom
Conversation
shati-patel
commented
Jan 30, 2024
| import { QueryOutputDir } from "../../../../src/local-queries/query-output-dir"; | ||
| import { runSuggestionsQuery } from "../../../../src/model-editor/suggestion-queries"; | ||
|
|
||
| describe("runSuggestionsQuery", () => { |
Contributor
Author
There was a problem hiding this comment.
I mainly added this test so that the new function wouldn't get flagged as deadcode 🙈 It's heavily inspired by the runModelEditorQueries test.
koesie10
reviewed
Jan 31, 2024
| const outputDir = new QueryOutputDir(join((await file()).path, "1")); | ||
|
|
||
| const options = { | ||
| parseResults: jest.fn().mockResolvedValue([]), |
Member
There was a problem hiding this comment.
Can we test that this function is called twice with mock results from bqrsDecodeAll and that the function returns the first and second results inside an object with input and output keys? I think that would add some value to ensure that the flow is correct.
Contributor
Author
There was a problem hiding this comment.
Good idea, thanks! I've added some mock data to make the test a bit more useful 🙌🏽
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds functions for running "suggestion queries" (i.e. CodeQL queries that populate the autocomplete suggestions in the model editor). These queries currently live on a branch from @koesie10's hackathon branch, so it's possible that the exact names and tags will change in future.
See internal issue for more details and context! ✨
Checklist
N/A - only used in tests for now
ready-for-doc-reviewlabel there.