Open pslaski opened 2 years ago
Thanks for the workaround, I stumbled upon this and wasn't able to make this work!
I don't think we can do that. Unfortunately, sbt decided to design its libraryDependencies
so that the setting itself is scoped in the project, but the right-hand-side has an additional % Test
or % IntegrationTest
. That means that we cannot add config-specific libraryDependencies
from a Seq[Setting[_]]
that should be passed in inConfig
.
Said in a different way: I do not see what setting we could put inside testConfigSettings
that would achieve the effect of, when passed through inConfig(IntegrationTest)(...)
, adding a dependency in the IntegrationTest
configuration.
An entirely different solution would be to resolve the dependency ourselves and patch it up directly in fullClasspath
. The problem with that is that it requires dark magic in our own build, as we must instead do an actual dependsOn
and not resolve from the internet. And every piece of dark magic like that dramatically reduces our confidence in our tests, since we don't actually test the sbt plugin as users will see it.
My opinion here is that we should improve the documentation instead.
Thanks for your response - yes, improving the documentation would be good too and probably the simplest and fastest solution
I have tried to run ScalaJS code as SBT Integration test suite, I configured them as is written in the docs
but, during execution of
IntegrationTest / fastLinkJS
operation, I gotThe fix for that is adding explicitly
scalajs-test-bridge
asIntegrationTest
scope dependency.My proposition is to have in
ScalaJSPlugin
defined integration tests config settings (similar totestConfigSettings
) which user can easily add toIntegrationTest
scope