File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
js-envs/src/test/scala/org/scalajs/jsenv/test Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import scala.concurrent.Await
1313import scala .concurrent .duration ._
1414
1515/** A couple of tests that test async runners for mix-in into a test suite */
16- trait AsyncTests {
16+ trait AsyncTests extends BasicJSEnvTests {
1717
1818 protected final val DefaultTimeout : Duration = 10 .seconds
1919
Original file line number Diff line number Diff line change 1+ package org .scalajs .jsenv .test
2+
3+ import org .junit .Test
4+ import org .junit .Assert ._
5+
6+ /** Tests that should succeed on any JSEnv */
7+ trait BasicJSEnvTests extends JSEnvTest {
8+
9+ @ Test
10+ def failureTest : Unit = {
11+
12+ """
13+ var a = {};
14+ a.foo();
15+ """ .fails()
16+
17+ }
18+
19+ @ Test
20+ def syntaxErrorTest : Unit = {
21+
22+ """
23+ {
24+ """ .fails()
25+
26+ }
27+
28+ }
You can’t perform that action at this time.
0 commit comments