@@ -67,13 +67,26 @@ private object JSEnvSuiteRunner {
67
67
private def getRunners (config : JSEnvSuiteConfig ): java.util.List [Runner ] = {
68
68
import java .lang .Boolean .{TRUE , FALSE }
69
69
70
- java.util.Arrays .asList(
71
- r[RunTests ](config, " withCom" -> FALSE ),
72
- r[RunTests ](config, " withCom" -> TRUE ),
73
- r[TimeoutRunTests ](config, " withCom" -> FALSE ),
74
- r[TimeoutRunTests ](config, " withCom" -> TRUE ),
75
- r[ComTests ](config),
76
- r[TimeoutComTests ](config)
77
- )
70
+ val runners = new java.util.ArrayList [Runner ]
71
+
72
+ val withComValues =
73
+ if (config.supportsCom) List (TRUE , FALSE )
74
+ else List (FALSE )
75
+
76
+ for (withCom <- withComValues)
77
+ runners.add(r[RunTests ](config, " withCom" -> withCom))
78
+
79
+ if (config.supportsTimeout) {
80
+ for (withCom <- withComValues)
81
+ runners.add(r[TimeoutRunTests ](config, " withCom" -> withCom))
82
+ }
83
+
84
+ if (config.supportsCom)
85
+ runners.add(r[ComTests ](config))
86
+
87
+ if (config.supportsCom && config.supportsTimeout)
88
+ runners.add(r[TimeoutComTests ](config))
89
+
90
+ runners
78
91
}
79
92
}
0 commit comments