Testing JavaScript

ReSharper can also support you in writing unit tests in JavaScript.

Running JavaScript unit tests

There are many different frameworks that allow you to write unit tests for JavaScript. The most popular ones are QUnit and Jasmine. What is really cool is that both are supported by ReSharper. It means that you can run them in the same way that you run C# tests written in NUnit or other frameworks. Very nice, isn't it?

A sample unit test written in QUnit is shown in the following screenshot:

Running JavaScript unit tests

As you can see, ReSharper recognizes and marks unit tests in the same way as they were with NUnit. Even the available menu options are the same. ...

Get ReSharper Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.