Jump to: navigation, search

Orion/JS Unit Test

< Orion
Revision as of 16:25, 20 January 2011 by Libingw.ca.ibm.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Writing Javascript unit test cases

We are using JS Test Driver for the Javascript unit test.

  • Test cases can be declared in .js files under your project.
  • A .js file can declare as many test cases as you want but we recommend you declare one test case per file.
  • The test case declaration is very simple :
MyTestCase = TestCase("MyTestCase");
MyTestCase.prototype.testA = function(){};