We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c00dfd commit 1d1820cCopy full SHA for 1d1820c
lib/PuppeteerSharp.Tests/Connection/ConnectionTests.cs
@@ -0,0 +1,26 @@
1
+using System;
2
+using System.Threading.Tasks;
3
+using Xunit;
4
+
5
+namespace PuppeteerSharp.Tests.Frame
6
+{
7
+ [Collection("PuppeteerLoaderFixture collection")]
8
+ public class ConnectionTests : PuppeteerPageBaseTest
9
+ {
10
+ [Fact]
11
+ public async Task ShouldThrowNiceErrors()
12
13
+ var exception = await Assert.ThrowsAsync<MessageException>(async () =>
14
15
+ await TheSourceOfTheProblems();
16
+ });
17
+ Assert.Contains("TheSourceOfTheProblems", exception.StackTrace);
18
+ Assert.Contains("ThisCommand.DoesNotExist", exception.Message);
19
+ }
20
21
+ private async Task TheSourceOfTheProblems()
22
23
+ await Page.Client.SendAsync("ThisCommand.DoesNotExist");
24
25
26
+}
0 commit comments