Orion/JS Unit Test

From Eclipsepedia

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

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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(){};