File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,16 @@ class JSSymbolTest {
6666object JSSymbolTest {
6767
6868 @ BeforeClass
69- def beforeClass () {
70- assumeTrue(" No symbol support" , ! js.isUndefined(js.Dynamic .global.Symbol ))
69+ def beforeClass (): Unit = {
70+ assumeTrue(" Assuming JavaScript symbols are supported" ,
71+ org.scalajs.testsuite.utils.Platform .areJSSymbolsSupported)
7172 }
7273
73- val sym1 = js.Symbol ()
74- val sym2 = js.Symbol ()
74+ /* These need to be lazy vals, so that they do not blow up if there is no
75+ * symbol support at all.
76+ */
77+ lazy val sym1 = js.Symbol ()
78+ lazy val sym2 = js.Symbol ()
7579
7680 def mkObject (members : (js.Symbol , js.Any )* ): js.Object = {
7781 val obj = (new js.Object ).asInstanceOf [ObjectCreator ]
You can’t perform that action at this time.
0 commit comments