Skip to content

Commit 5359dd9

Browse files
NetdocsCopilot
andcommitted
test(calculator): await ProcessAsync instead of blocking
Fixes the xUnit1031 analyzer warning that was failing the CI lint step (dotnet format --verify-no-changes). The test now awaits the async call directly rather than blocking on GetAwaiter().GetResult(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b32a029 commit 5359dd9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/Netdocs.Core.Tests/CalculatorPluginTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ public void Output_CarriesExprAndFormat()
7272
}
7373

7474
[Fact]
75-
public void Evaluator_RegisteredOnceGlobally_NotInContent()
75+
public async Task Evaluator_RegisteredOnceGlobally_NotInContent()
7676
{
7777
// The evaluator is a site-wide inline script, never injected into page content.
7878
var plugin = new CalculatorPlugin();
7979
var ctx = new FakeContext();
8080
plugin.Configure(ctx);
8181
var site = new SiteContext { Config = new SiteConfig(), Options = new BuildOptions(), LoggerFactory = NullLoggerFactory.Instance };
8282
var page = new Page { SourcePath = "x.md", RelativePath = "x.md", RawMarkdown = PowerCalc };
83-
var result = plugin.ProcessAsync(page, PowerCalc, site, CancellationToken.None).GetAwaiter().GetResult();
83+
var result = await plugin.ProcessAsync(page, PowerCalc, site, CancellationToken.None);
8484

8585
Assert.Single(ctx.InlineScripts);
8686
Assert.Contains("function bindAll", ctx.InlineScripts[0]);

0 commit comments

Comments
 (0)