lib/JSLitmus.js
function(name, f) {
      // Create the Test object
      var test = new Test(name, f);
      JSLitmus._tests.push(test);

      // Re-render if the test state changes
      test.onChange = JSLitmus.renderTest;

      // Run the next test if this one finished
      test.onStop = function(test) {
        if (JSLitmus.onTestFinish) JSLitmus.onTestFinish(test);
        JSLitmus.currentTest = null;
        JSLitmus._nextTest();
      };

      // Render the new test
      this.renderTest(test);
    }
function(name, f) {
      // Create the Test object
      var test = new Test(name, f);
      JSLitmus._tests.push(test);

      // Re-render if the test state changes
      test.onChange = JSLitmus.renderTest;

      // Run the next test if this one finished
      test.onStop = function(test) {
        if (JSLitmus.onTestFinish) JSLitmus.onTestFinish(test);
        JSLitmus.currentTest = null;
        JSLitmus._nextTest();
      };

      // Render the new test
      this.renderTest(test);
    }
function ( name , f ) { // Create the Test object var test = new Test ( name , f ) ; JSLitmus . _tests . push ( test ) ; // Re-render if the test state changes test . onChange = JSLitmus . renderTest ; // Run the next test if this one finished test . onStop = function ( test ) { if ( JSLitmus . onTestFinish ) JSLitmus . onTestFinish ( test ) ; JSLitmus . currentTest = null ; JSLitmus . _nextTest ( ) ; } ; // Render the new test this . renderTest ( test ) ; }
Create a new test
Create a new test