Add test for resolveQueryByLanguage#938
Merged
shati-patel merged 2 commits intogithub:mainfrom Sep 2, 2021
Merged
Conversation
aeisenberg
reviewed
Sep 1, 2021
extensions/ql-vscode/src/vscode-tests/cli-integration/data/simple-query.ql
Outdated
Show resolved
Hide resolved
adityasharad
approved these changes
Sep 1, 2021
| } | ||
| }); | ||
|
|
||
| it('should resolve query by language', async function() { |
Contributor
There was a problem hiding this comment.
Sometimes it is useful to test negative results. If you wish, you can add a second test query that looks like the original (no import statement), and a corresponding test function that checks queryInfo.byLanguage is an empty object.
Contributor
Author
There was a problem hiding this comment.
Hmm, I've been trying to test a non-language query, but it keeps resolving the language as javascript anyway 🤔 Maybe because the CLI picks up on a nearby qlpack.yml file? I'll try putting a test query in some different locations!
Contributor
Author
There was a problem hiding this comment.
(I haven't found a nice way to do this, so I'm going to skip this for now...)
aeisenberg
approved these changes
Sep 2, 2021
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.
Adding another test! (follow-up to #937).
simple-javascript-query.qlwith an import statement'javascript'Checklist
N/A - not user-facing
@github/docs-content-codeqlhas been cc'd in all issues for UI or other user-facing changes made by this pull request.