Contents

JavaScript testing - first impressions of Wallabyjs and Visual Studio

Contents

I’ve been a big fan of NCrunch for a long time now, when it comes to .Net test runners I don’t think there are any that beat it. So when I heard about the JavaScript test runner Wallaby I was intrigued enough to give it a try, even if it did mean writing JavaScript tests.

This week I started to write some new AngularJS functionality at DrDoctor and thought that now was as good a time as any to start writing a few JavaScript tests.

This post isn’t about writing Jasmine tests for Angular, there are already plenty of tutorials out on the internet, but rather about highlighting some of the features of Wallabyjs.

/javascript-testing-first-impressions-of-wallabyjs/images/1-inline-code-coverage.png

In line code coverage

/javascript-testing-first-impressions-of-wallabyjs/images/3-red-when-tests-failing.png

When you have failing tests the inline coverage changes for that block to red

/javascript-testing-first-impressions-of-wallabyjs/images/2-lines-covered-by-tests.png

Show covering tests

/javascript-testing-first-impressions-of-wallabyjs/images/4-link-to-failing-test.png

If a test is failing it will show up in here as well and give you some details

/javascript-testing-first-impressions-of-wallabyjs/images/5-failing-test.png

Wallabyjs will also display the reasons your tests are failing

/javascript-testing-first-impressions-of-wallabyjs/images/6-highlight-uncovered-blocks.png

Highlight uncovered lines of code in a file

🍪 I use Disqus for comments

Because Disqus requires cookies this site doesn't automatically load comments.

I don't mind about cookies - Show me the comments from now on (and set a cookie to remember my preference)