Skip to content

Commit a327899

Browse files
japgollysjrd
authored andcommitted
Test that NodeList ops are available without imports
1 parent 711dc27 commit a327899

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@ package org.scalajs.dom.tests.shared
22

33
import java.util.UUID
44
import org.junit.Test
5-
import org.scalajs.dom._
65

76
trait SharedTests {
87
import SharedTests._
98

9+
// 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
12+
}
13+
14+
// Don't move up
15+
import org.scalajs.dom._
16+
1017
// https://github.com/scala-js/scala-js-dom/issues/411 - console doesn't work in web workers
1118
@Test final def ConsoleLogTest(): Unit =
1219
console.log("Testing console.log")
@@ -22,6 +29,8 @@ trait SharedTests {
2229
}
2330

2431
object SharedTests {
32+
import org.scalajs.dom._
33+
2534
def testIdb(idb: IDBFactory): Unit = {
2635
val open = idb.open(UUID.randomUUID().toString())
2736
open.onerror = (e: Event) => sys.error("idb open failed: " + e)

0 commit comments

Comments
 (0)