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 30788df commit e3f2e04Copy full SHA for e3f2e04
tests/multipart/src/commonTest/kotlin/test/MultipartSubscriptionsMockServerTest.kt
@@ -263,6 +263,18 @@ class MultipartSubscriptionsMockServerTest {
263
}
264
265
266
+ @Test
267
+ fun trailingDataIsIgnored() = multipartSubsTest {
268
+ enqueue(
269
+ "\r\n--graphql\r\nContent-Type: application/json\r\n\r\n{\"payload\":{\"data\":{\"hello\":\"world\"}}}" +
270
+ "\r\n--graphql--foo\r\nbar"
271
+ )
272
+ apolloClient.subscription(HelloSubscription()).toFlow().test(timeout = 300.milliseconds) {
273
+ assertEquals("world", awaitItem().dataOrThrow().hello)
274
+ awaitComplete()
275
+ }
276
277
+
278
@Test
279
fun malformedMultipartTriggersReturnsErrorResponse() = multipartSubsTest {
280
// No end boundary
0 commit comments