10000 Also run test-common tests in JS by gzm0 · Pull Request #3700 · scala-js/scala-js · GitHub
[go: up one dir, main page]

Skip to content

Also run test-common tests in JS #3700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ def Tasks = [
"test-suite-ecma-script2015": '''
setJavaVersion $java
npm install &&
sbtretry ++$scala jUnitTestOutputsJVM/test jUnitTestOutputsJS/test \
'set scalaJSStage in Global := FullOptStage' jUnitTestOutputsJS/test &&
sbtretry ++$scala jUnitTestOutputsJVM/test jUnitTestOutputsJS/test testBridge/test \
'set scalaJSStage in Global := FullOptStage' jUnitTestOutputsJS/test testBridge/test &&
sbtretry ++$scala $testSuite/test &&
sbtretry 'set scalaJSStage in Global := FullOptStage' \
++$scala $testSuite/test \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,20 @@ import org.scalajs.junit.async._

class AsyncTest {
@Test
def success(): AsyncResult = {
val res = Future(1 + 1).filter(_ == 2)
await(res)
def success(): AsyncResult = await {
Future(1 + 1).filter(_ == 2)
}

@Test(expected = classOf[IllegalArgumentException])
def expectedException(): AsyncResult = {
def expectedException(): AsyncResult = await {
// Do not throw synchronously.
val res = Future.failed(new IllegalArgumentException)
await(res)
Future.failed(new IllegalArgumentException)
}

@Test
def asyncFailure(): AsyncResult = {
def asyncFailure(): AsyncResult = await {
// Do not throw synchronously.
val res = Future.failed(new IllegalArgumentException)
await(res)
Future.failed(new IllegalArgumentException)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ abstract class JUnitTest {
List('v', 's', 'n')
)

@Test def testJUnitOutput(): AsyncResult = {
@Test def testJUnitOutput(): AsyncResult = await {
val futs = for (args <- frameworkArgss) yield {
for {
rawOut <- runTests(args.map("-" + _))
Expand All @@ -78,7 +78,7 @@ abstract class JUnitTest {
}
}

await(Future.sequence(futs).map(_ => ()))
Future.sequence(futs).map(_ => ())
}

private def runTests(args: List[String]): Future[List[Output]] = {
Expand Down
Loading
0