Skip to content

Commit 361b29e

Browse files
committed
Fix unawaited async Task tests by changing to void
1 parent 2b70a25 commit 361b29e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

test/PowerShellEditorServices.Test/Language/SemanticTokenTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Microsoft.PowerShell.EditorServices.Test.Language
1717
public class SemanticTokenTest
1818
{
1919
[Fact]
20-
public async Task TokenizesFunctionElements()
20+
public void TokenizesFunctionElements()
2121
{
2222
string text = @"
2323
function Get-Sum {
@@ -59,7 +59,7 @@ function Get-Sum {
5959
}
6060

6161
[Fact]
62-
public async Task TokenizesStringExpansion()
62+
public void TokenizesStringExpansion()
6363
{
6464
string text = "Write-Host \"$(Test-Property Get-Whatever) $(Get-Whatever)\"";
6565
ScriptFile scriptFile = new ScriptFile(
@@ -82,7 +82,7 @@ public async Task TokenizesStringExpansion()
8282
}
8383

8484
[Fact]
85-
public async Task RecognizesTokensWithAsterisk()
85+
public void RecognizesTokensWithAsterisk()
8686
{
8787
string text = @"
8888
function Get-A*A {
@@ -111,7 +111,7 @@ function Get-A*A {
111111
}
112112

113113
[Fact]
114-
public async Task RecognizesArrayPropertyInExpandableString()
114+
public void RecognizesArrayPropertyInExpandableString()
115115
{
116116
string text = "\"$(@($Array).Count) OtherText\"";
117117
ScriptFile scriptFile = new ScriptFile(
@@ -136,7 +136,7 @@ public async Task RecognizesArrayPropertyInExpandableString()
136136
}
137137

138138
[Fact]
139-
public async Task RecognizesCurlyQuotedString()
139+
public void RecognizesCurlyQuotedString()
140140
{
141141
string text = "“^[-'a-z]*”";
142142
ScriptFile scriptFile = new ScriptFile(
@@ -150,7 +150,7 @@ public async Task RecognizesCurlyQuotedString()
150150
}
151151

152152
[Fact]
153-
public async Task RecognizeEnum()
153+
public void RecognizeEnum()
154154
{
155155
string text = @"
156156
enum MyEnum{

test/PowerShellEditorServices.Test/Session/PowerShellContextTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System;
55
using System.Collections.Generic;
6-
using System.IO;
76
using System.Linq;
87
using System.Management.Automation;
98
using System.Runtime.InteropServices;
@@ -149,7 +148,7 @@ await this.powerShellContext.ExecuteCommandAsync<string>(
149148

150149
[Trait("Category", "PSReadLine")]
151150
[SkippableFact]
152-
public async Task CanGetPSReadLineProxy()
151+
public void CanGetPSReadLineProxy()
153152
{
154153
Skip.If(IsWindows, "This test doesn't work on Windows for some reason.");
155154
Assert.True(PSReadLinePromptContext.TryGetPSReadLineProxy(

0 commit comments

Comments
 (0)