Do you test your JavaScript?

Last updated by Lee Hawkins [SSW] about 2 years ago.See history

The need to build rich web user interfaces is resulting in more and more JavaScript in our applications.

Because JavaScript does not have the safeguards of strong typing and compile-time checking, it is just as important to unit test your JavaScript as your server-side code.

You can write unit tests for JavaScript using:

Jest is recommended since it runs faster than Karma (due to the fact that Karma runs tests in a browser while Jest runs tests in Node).

Adam Cogan
Chris Clement
We open source. Powered by GitHub