Skip to content

Commit c83b5e7

Browse files
jnyrupleonardo-fernandes
authored andcommitted
Skip ShouldDownloadAndExtractFirefoxLinuxBinary on Windows (hardkoded#2232)
The built-in Windows command 'tar' delegates handling of .tar.bzip2 archives to another command 'bzip2'. Windows 10 does not come with 'bzip2' pre-installed.
1 parent 5139ea1 commit c83b5e7

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System.Runtime.InteropServices;
2+
using Xunit;
3+
4+
namespace PuppeteerSharp.Tests.Attributes
5+
{
6+
internal class SkipWindowsFact : FactAttribute
7+
{
8+
public SkipWindowsFact()
9+
{
10+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
11+
{
12+
return;
13+
}
14+
15+
Skip = "Test will not run on windows.";
16+
}
17+
}
18+
}

lib/PuppeteerSharp.Tests/LauncherTests/BrowserFetcherTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public async Task ShouldDownloadAndExtractLinuxBinary()
7474
}
7575

7676
[PuppeteerTest("launcher.spec.ts", "BrowserFetcher", "should download and extract firefox linux binary")]
77-
[PuppeteerFact]
77+
[SkipWindowsFact]
7878
public async Task ShouldDownloadAndExtractFirefoxLinuxBinary()
7979
{
8080
using var browserFetcher = Puppeteer.CreateBrowserFetcher(new BrowserFetcherOptions

0 commit comments

Comments
 (0)