-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Switched to single test framework per TestModule #1268
Conversation
@@ -218,13 +218,13 @@ trait TestScalaJSModule extends ScalaJSModule with TestModule { | |||
val (close, framework) = mill.scalajslib.ScalaJSWorkerApi.scalaJSWorker().getFramework( | |||
toolsClasspath().map(_.path), | |||
jsEnvConfig(), | |||
testFrameworks().head, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems strange to have mill-contrib-testng
artifact with an hardcoded _2.13
.
I guess it's to be used with Java projects.
If you mix it with other Scala dependencies not on Scala 2.13 it silently breaks the binary compatibility.
Maybe we should rewrite that module in pure java if possible?
Other than this it looks good to me!
Oh, our testng framework is already a pure Java implementation. I think the Scala binary suffix is an oversight due to current consistent packaging setup. |
I think it was a side effect of this change EDIT: Actually it started to depend on |
From my side the issue with TestNG can be fixed later with a separate PR. |
We added Integration tests which obviously need mill. ;-) I now changed this dependency to be only a dependency of the actual test module, not the outer testng framework implementation. |
} | ||
) | ||
classFingerprint.map(classF => classF._1.getName.stripSuffix("$")) | ||
Seq.from(classFingerprint.map(classF => classF._1.getName.stripSuffix("$"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curiosity: why not .toSeq
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.toSeq
gives a deprecation warning, and any fix is more verbose and results in the same call.
scalalib/src/TestModule.scala
Outdated
"predefined TestModules: TestNg, Junit, Scalatest, ..." | ||
if (frameworks.size != 1) { | ||
Result.Failure( | ||
"Since mill after-0.9.6 only one test framework per TestModule is supported. " ++ msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First time I see string concatenation with ++
:) Is it to not confuse it with the sum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea, haha. Will fix it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job on this one! Thank you!
Looks great really, seems like a great simplification! |
scalalib/src/TestModule.scala
Outdated
* TestModule that uses Scalatest Framework to run tests. | ||
* You need to provide the scalatest dependencies yourself. | ||
*/ | ||
trait Scalatest extends TestModule { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ScalaTest is more precise I think.
It's mainly because those which come with Also, the most Scala-based test frameworks are more complex in regard of their dependencies, many have extra options for e.g. ScalaCheck, or shapeless
Oh, yeah. I never used it or saw it in action. But if you say, it works as smooth as all the others in mill, I can add a trait for it, too. |
Looks like latest CI runs fail because |
Thx for adding MUnit, it's really awesome framework! :) |
See #1269 |
Introduced new methods and targets where appropriate. Deprecated all methods that support multiple frameworks.
Introduced new methods and targets where appropriate.
Deprecated all methods that support multiple frameworks.
See also discussion in #170