Skip to content

Commit

Permalink
Prevent flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
kblok committed Jul 21, 2023
1 parent 382dfe5 commit b7d33f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/PuppeteerSharp.Tests/CoverageTests/JSCoverageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public async Task ShouldReportSourceUrls()
{
await Page.Coverage.StartJSCoverageAsync();
await Page.GoToAsync(TestConstants.ServerUrl + "/jscoverage/sourceurl.html");
// Prevent flaky tests.
await Task.Delay(1000);
var coverage = await Page.Coverage.StopJSCoverageAsync();
Assert.Single(coverage);
Assert.Equal("nicename.js", coverage[0].Url);
Expand Down

0 comments on commit b7d33f5

Please sign in to comment.