How to create test suite in JsUnit

63 views Asked by At

How do I create a test suite in JsUnit like I would with JUnit? I have many tests that I would like to run together. For example, I have two tests in test1.html and test2.html that I would like to group together to run.

1

There are 1 answers

0
Unmitigated On BEST ANSWER

Write a suite function in your page that returns a JsUnitTestSuite.

function suite(){
  var suite = new JsUnitTestSuite();
  suite.addTestPage("/path/test1.html");//use the addTestPage() method to add a test page
  suite.addTestPage("/path/test2.html");
  return suite;
}