diff --git a/client/tests/src/main/scala/sttp/tapir/client/tests/ClientBasicTests.scala b/client/tests/src/main/scala/sttp/tapir/client/tests/ClientBasicTests.scala index 25b959973e..40f5fb1346 100644 --- a/client/tests/src/main/scala/sttp/tapir/client/tests/ClientBasicTests.scala +++ b/client/tests/src/main/scala/sttp/tapir/client/tests/ClientBasicTests.scala @@ -47,7 +47,13 @@ trait ClientBasicTests { this: ClientTests[Any] => in_query_list_out_header_list, port, List("plum", "watermelon", "apple") - ).unsafeToFuture().map(_.right.get should contain theSameElementsAs List("apple", "watermelon", "plum")) + ).unsafeToFuture().map( + _.right.get should contain theSameElementsAs ( + // The fetch API merges multiple header values having the same name into a single comma separated value + if (platformIsScalaJS) + List("apple, watermelon, plum") + else + List("apple", "watermelon", "plum"))) } // cookie support in sttp is currently only available on the JVM if (!platformIsScalaJS) {