Skip to content

Commit 5a52404

Browse files
authored
Merge pull request #546 from scala-js/test/371
Test that DOMTokenList acts like a Seq
2 parents c7a8a26 + bb750c6 commit 5a52404

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests-shared/src/main/scala/org/scalajs/dom/tests/shared/SharedTests.scala

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@ trait SharedTests {
77
import SharedTests._
88

99
// This tests that ops are always implicitly available, no imports required
10-
@Test final def NodeListOpsTest(): Unit = {
11-
val _ = org.scalajs.dom.document.body.childNodes.mkString
10+
@Test final def NodeListOpsTest(): Unit =
11+
org.scalajs.dom.document.body.childNodes.mkString
12+
13+
// This tests that ops are always implicitly available, no imports required
14+
@Test final def DOMTokenListOpsTest(): Unit = {
15+
org.scalajs.dom.document.querySelectorAll("*")
16+
.iterator
17+
.collect { case e: org.scalajs.dom.html.Element => e }
18+
.map(_.classList.mkString)
1219
}
1320

1421
// Don't move up

0 commit comments

Comments
 (0)