Skip to content

Commit 8be6b08

Browse files
committed
chore: fix failed test on CI by resetting error count
1 parent 314e0dd commit 8be6b08

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/docfx.Tests/CommandLineTest.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using Docfx.Common;
5+
46
namespace Docfx.Tests;
57

68
[Collection("docfx STA")]
7-
public static class CommandLineTest
9+
public class CommandLineTest
810
{
911
[Fact]
1012
public static void PrintsVersion()
@@ -31,7 +33,14 @@ public static void PrintsHelp()
3133
[Fact]
3234
public static void FailForUnknownArgs()
3335
{
34-
Assert.Equal(-1, Program.Main(["--unknown"]));
36+
try
37+
{
38+
Assert.Equal(-1, Program.Main(["--unknown"]));
39+
}
40+
finally
41+
{
42+
Logger.ResetCount();
43+
}
3544
}
3645

3746
[Fact]

0 commit comments

Comments
 (0)