diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-02 23:58:00 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-03 00:24:46 -0800 |
commit | bfd64f104a283b70ad57a66c8ac7d4dc3bda9e6f (patch) | |
tree | bda95b847b7f8e520565b05dacd14c7bffaae1bd /scalajslib | |
parent | 4c76e9668ab9683dad1966bcd6fb5031a81f8460 (diff) | |
download | mill-bfd64f104a283b70ad57a66c8ac7d4dc3bda9e6f.tar.gz mill-bfd64f104a283b70ad57a66c8ac7d4dc3bda9e6f.tar.bz2 mill-bfd64f104a283b70ad57a66c8ac7d4dc3bda9e6f.zip |
Make `TestEvaluator` infer it's `outPath` from the `sourcecode.FullName` and `utest.framework.TestPath`
Diffstat (limited to 'scalajslib')
-rw-r--r-- | scalajslib/test/src/mill/scalajslib/HelloJSWorldTests.scala | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/scalajslib/test/src/mill/scalajslib/HelloJSWorldTests.scala b/scalajslib/test/src/mill/scalajslib/HelloJSWorldTests.scala index 89191ad2..18fbc269 100644 --- a/scalajslib/test/src/mill/scalajslib/HelloJSWorldTests.scala +++ b/scalajslib/test/src/mill/scalajslib/HelloJSWorldTests.scala @@ -17,10 +17,10 @@ import scala.collection.JavaConverters._ object HelloJSWorldTests extends TestSuite { - + val workspacePath = TestEvaluator.getOutPathStatic() trait HelloJSWorldModule extends ScalaJSModule with PublishModule { - override def millSourcePath = HelloJSWorldTests.workspacePath + override def millSourcePath = workspacePath override def mainClass = Some("Main") } @@ -77,14 +77,11 @@ object HelloJSWorldTests extends TestSuite { } val millSourcePath = pwd / 'scalajslib / 'test / 'resources / "hello-js-world" - val workspacePath = pwd / 'target / 'workspace / "hello-js-world" - val outputPath = workspacePath / 'out - val mainObject = workspacePath / 'src / "Main.scala" - val helloWorldEvaluator = new TestEvaluator( - HelloJSWorld, - workspacePath, - ) + val helloWorldEvaluator = TestEvaluator.static(HelloJSWorld) + + + val mainObject = helloWorldEvaluator.outPath / 'src / "Main.scala" class Console { val out = new StringWriter() |