com-lihaoyi / utest

A simple testing framework for Scala

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Customising the framework in JS crashes and reports success (!)

japgolly opened this issue · comments

Using a customised instance of runner.Framework crashes and reports success when an assertion fails in JS.

Example with default framework:

-------------------------------- Running Tests --------------------------------
[object Object]
[object Object]
false
X japgolly.scalajs.react.core.internal.JsReprTest.implicits.caseClass 3ms 
  utest.AssertionError: assert(actual == expect)
  actual: scala.scalajs.js.Any = [object Object]
  expect: scala.scalajs.js.Any = [object Object]
    japgolly.scalajs.react.core.internal.JsReprTest$.test$1(test-test-fastopt.js:43417)
    <jscode>.{anonymous}()(test-test-fastopt.js:43330)
[info] Tests: 1, Passed: 0, Failed: 1
[error] Failed tests:
[error] 	japgolly.scalajs.react.core.internal.JsReprTest
[error] (test/test:testOnly) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 25 s, completed 12/07/2018 11:56:57 AM

Example with custom framework:

-------------------------------- Running Tests --------------------------------
[object Object]
[object Object]
false
[trace] Stack trace suppressed: run last test/test:testOnly(name: japgolly.scalajs.react.core.internal.JsReprTest, isModule: true) for the full output.
[success] Total time: 20 s, completed 12/07/2018 12:01:35 PM