How to write test-case for Scala.js application

Table of contents
Reading Time: < 1 minute

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`.

Screenshot from 2016-02-29 14-01-01

Written by 

Ayush is the Sr. Lead Consultant @ Knoldus Software LLP. In his 10 years of experience he has become a developer with proven experience in architecting and developing web applications. Ayush has a Masters in Computer Application from U.P. Technical University, Ayush is a strong-willed and self-motivated professional who takes deep care in adhering to quality norms within projects. He is capable of managing challenging projects with remarkable deadline sensitivity without compromising code quality.

Discover more from Knoldus Blogs

Subscribe now to keep reading and get access to the full archive.

Continue reading