-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try testing without a bundler, by setting NODE_PATH (#2)
Tests can be run without a bundler, by setting NODE_PATH
- Loading branch information
Showing
9 changed files
with
73 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import $exec.plugins | ||
|
||
import io.github.nafg.millbundler.jsdeps.ScalaJSNpmModule | ||
import mill.scalajslib.api.ModuleKind | ||
import mill.scalalib.{DepSyntax, TestModule} | ||
import mill.scalajslib.api.JsEnvConfig | ||
|
||
|
||
object main extends ScalaJSNpmModule { | ||
override def scalaVersion = "2.13.10" | ||
override def scalaJSVersion = "1.10.1" | ||
|
||
override def ivyDeps = | ||
Agg( | ||
ivy"io.github.nafg.scalajs-facades::react-phone-number-input_3::0.16.0" | ||
) | ||
|
||
object test | ||
extends Tests | ||
with ScalaJSNpmModule.Test | ||
with TestModule.Munit { | ||
|
||
override def moduleKind = ModuleKind.CommonJSModule | ||
|
||
override def ivyDeps = | ||
super.ivyDeps() ++ Agg(ivy"org.scalameta::munit::0.7.29") | ||
} | ||
} | ||
|
||
def verify = T { | ||
val logger = T.ctx().log | ||
val (_, testResults) = main.test.test()() | ||
assert(testResults.nonEmpty, "No tests found") | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
millbundler/test/src/webpack-simple/main/test/src/Tests.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import io.github.nafg.scalajs.facades.reactphonenumberinput._ | ||
import munit.Assertions._ | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation._ | ||
|
||
|
||
class Tests extends munit.FunSuite { | ||
test("ReactPhoneNumberInput") { | ||
assert(!js.isUndefined(ReactPhoneNumberInput.raw)) | ||
} | ||
} |