Writing Javascript unit test cases

We are using JS Test Driver for Javascript unit testing. Here are steps to write your own test cases.

Test cases can be declared in .js files under your project. We're still working on best practices on where to put your tests but for now a simple approach is to create a folder co-located with your regular code under your project like this:

A .js file can declare as many test cases as you want but declaring one test case per file will be the best practice.

The test case declaration is as below. You will declare all the tests as functions .For more details refer to here.