如何调试scala.js单元测试? [英] How can I debug scala.js unit tests?
本文介绍了如何调试scala.js单元测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
目前,我所知道的(逐步)调试Scala.js代码的唯一方法是在浏览器中。您可以在sbt中为您的测试生成一个HTML转轮:
sbt> testHtmlFastOpt
// snip
[info]写了HTML测试运行器。将您的浏览器指向... / test-suite-fastopt-test.html
.js 0.6.10。
I have some scala.js unit tests written in utest. They all run just fine from the sbt build, however I would like to be able to step through the unit tests in a debugger. Using my favorite IDE (intellij) to debug the tests won't work because it will try to run them on the JVM. Is there some way to step through the unit test execution similar to how you can step through the (javascript) application code in browsers like chrome?
解决方案
Currently, the only way to (step-by-step) debug Scala.js code I know of, is inside a browser. You can generate an HTML runner for your tests in sbt:
sbt> testHtmlFastOpt
// snip
[info] Wrote HTML test runner. Point your browser to .../test-suite-fastopt-test.html
This works starting Scala.js 0.6.10.
这篇关于如何调试scala.js单元测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文