-
Notifications
You must be signed in to change notification settings - Fork 236
Send Pester describe line and info whether Pester 4.6.0 is installed to PowerShell.RunPesterTests command #856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f26755f
Revert "Fix #827 Pester TestName w/expandable str returns nothing (#8…
bergmeister a034574
Revert "Revert "Fix #827 Pester TestName w/expandable str returns not…
bergmeister c978a6f
send describe block line and info whether pester 4.6.0 is available t…
bergmeister 725f643
send only describeBlockLineNumber as nullable int over the wire to PS…
bergmeister 62b101b
use clearer way of passing in null when int is nullable
bergmeister b6b4b4c
address stylistic nitpicks by Patrick
bergmeister dbd42b5
Use lazy initialisation to query pester version only when it is neede…
bergmeister 61f62f5
Merge branch 'master' of https://github.com/PowerShell/PowerShellEdit…
bergmeister ba32b20
use pscommand instead
bergmeister 565f2f8
Merge branch 'master' of https://github.com/PowerShell/PowerShellEdit…
bergmeister 32c69aa
Update src/PowerShellEditorServices.Host/CodeLens/PesterCodeLensProvi…
rjmholt 69e7260
Merge branch 'PesterDescribeLine' of https://github.com/bergmeister/P…
bergmeister e5bddd0
adress style PR comments
bergmeister 39290a2
Merge branch 'master' of https://github.com/PowerShell/PowerShellEdit…
bergmeister 7245bd6
Use Get-Command and make calls to GetPesterCodeLens async/await to th…
bergmeister 4ec3b3f
Oops, I did it again...
bergmeister File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You made this function
async
, but didn't add anyawait
statements soasync
isn't needed here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to change it here as well due to the signature change in the interface. The
PesterCodeLensProvider
properly implements async-await, which is what countsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting! Typically the compiler yells if you have an
async
but noawait
but I guess since the interface requires it, the compiler doesn't yell.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it emits a warning though that this function won't run async as expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could changed the method to return:
to make it happy I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a good idea because you might as well just suppress the warning. The compiler is happy, it is just kind to let us know that this other implementation will actually run synchronously despite the async declaration, Task.FromResult will still make it run sync but add unnecessary overhead. The warning is good to have because it is a way of tracking possible future improvement and also letting methods being called from this method know that they will actually need to adapt on a higher level if someone made them truly async as well