Unit Tests in WordPress: Testing JavaScript With Karma

If you decide that you need to make unit tests on your plugin, it is because it’s quite complex and it’s probably a mix of PHP and JavaScript code. If you think that testing just your PHP code is enough, you are definitely on the wrong path. The JavaScript code can be as complex as the PHP counterpart, and as likely to have bugs in it.

Read more Unit Tests in WordPress: Testing JavaScript With Karma