File tree Expand file tree Collapse file tree 9 files changed +133
-181
lines changed
junit-test/shared/src/test/scala/org/scalajs/junit
linker/shared/src/test/scala/org/scalajs/linker
test-common/src/test/scala/org/scalajs/testing/common
test-suite/js/src/test/require-dynamic-import/org/scalajs/testsuite/jsinterop Expand file tree Collapse file tree 9 files changed +133
-181
lines changed Original file line number Diff line number Diff line change @@ -146,8 +146,8 @@ def Tasks = [
146
146
" test-suite-ecma-script2015" : '''
147
147
setJavaVersion $java
148
148
npm install &&
149
- sbtretry ++$scala jUnitTestOutputsJVM/test jUnitTestOutputsJS/test \
150
- 'set scalaJSStage in Global := FullOptStage' jUnitTestOutputsJS/test &&
149
+ sbtretry ++$scala jUnitTestOutputsJVM/test jUnitTestOutputsJS/test testBridge/test \
150
+ 'set scalaJSStage in Global := FullOptStage' jUnitTestOutputsJS/test testBridge/test &&
151
151
sbtretry ++$scala $testSuite/test &&
152
152
sbtretry 'set scalaJSStage in Global := FullOptStage' \
153
153
++$scala $testSuite/test \
Original file line number Diff line number Diff line change @@ -23,23 +23,20 @@ import org.scalajs.junit.async._
23
23
24
24
class AsyncTest {
25
25
@ Test
26
- def success (): AsyncResult = {
27
- val res = Future (1 + 1 ).filter(_ == 2 )
28
- await(res)
26
+ def success (): AsyncResult = await {
27
+ Future (1 + 1 ).filter(_ == 2 )
29
28
}
30
29
31
30
@ Test (expected = classOf [IllegalArgumentException ])
32
- def expectedException (): AsyncResult = {
31
+ def expectedException (): AsyncResult = await {
33
32
// Do not throw synchronously.
34
- val res = Future .failed(new IllegalArgumentException )
35
- await(res)
33
+ Future .failed(new IllegalArgumentException )
36
34
}
37
35
38
36
@ Test
39
- def asyncFailure (): AsyncResult = {
37
+ def asyncFailure (): AsyncResult = await {
40
38
// Do not throw synchronously.
41
- val res = Future .failed(new IllegalArgumentException )
42
- await(res)
39
+ Future .failed(new IllegalArgumentException )
43
40
}
44
41
}
45
42
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ abstract class JUnitTest {
55
55
List ('v' , 's' , 'n' )
56
56
)
57
57
58
- @ Test def testJUnitOutput (): AsyncResult = {
58
+ @ Test def testJUnitOutput (): AsyncResult = await {
59
59
val futs = for (args <- frameworkArgss) yield {
60
60
for {
61
61
rawOut <- runTests(args.map(" -" + _))
@@ -78,7 +78,7 @@ abstract class JUnitTest {
78
78
}
79
79
}
80
80
81
- await( Future .sequence(futs).map(_ => () ))
81
+ Future .sequence(futs).map(_ => ())
82
82
}
83
83
84
84
private def runTests (args : List [String ]): Future [List [Output ]] = {
You can’t perform that action at this time.
0 commit comments