Few months ago, I created a web application ‘Weather Report‘, based on Scala.js. In this blog, I have explained how we can test our Scala.js application.
Since I am still exploring it, so I took help from scalajs-tutorial. I have used µTest as testing library.
Here is example of test-cases:
In the above example, we can see verified triggered event on button click. This is a sample test-case. We can add more scenario depends on application. You can find complete working and tested code here:- ScalaJs_Weather_Report
Now pull the code and run `sbt test`.