Sha256: 704775b36a5bfc4256076ea8b61297fd56628ccc20f21f56f198c6cab11c925b

Contents?: true

Size: 1.18 KB

Versions: 31

Compression:

Stored size: 1.18 KB

Contents

load("test/qunit/qunit/qunit.js");

(function(){
  var assertion_index = 0;

  var module_index = 0;
  var module;

  var test_index = 0;
  var test;

  QUnit.moduleStart = function(m,te) {
    module = m;
    module_index++;
  };

  QUnit.moduleDone = function(t,f,tx) {
    var s = module_index + ". module "+t+": "; 
    if ( f ) {
      s += f + " failure(s) in " + tx + " tests";
    } else {
      s += "all " + tx + " tests successful";
    }
    // print(s);
    module = undefined;
  };

  QUnit.testStart = function(t) {
    test = t;
    test_index++;
  };

  QUnit.testDone = function(t) {
    test = undefined;
  }

  QUnit.log = function(r,m) {
    assertion_index++;
    var test_string = "";
    if ( module || test ) {
      var test_string = "[";
      if ( module ) {
        test_string += module;
        if ( test ) {
          test_string += ": ";
        }
      }
      if ( test ) {
        test_string += test;
      }
      test_string += "] ";
    }
    var s = ( r ? "PASS (" : "FAIL (" ) + assertion_index + ") " + test_string + m;
    print(s);
  };

  QUnit.done = function(f,t) {
    print((t-f) + " Passed, " +  f + " Failed, " + t + " Total Tests" );
  };

})(QUnit);

Version data entries

31 entries across 31 versions & 4 rubygems

Version Path
envjs19-0.3.8.20101029121421 test/qunit.js
envjs-0.3.8 test/qunit.js
envjs-0.3.7 test/qunit.js
envjs-0.3.6 test/qunit.js
envjs-0.3.5 test/qunit.js
envjs-0.3.4 test/qunit.js
envjs-0.3.3 test/qunit.js
envjs-0.3.2 test/qunit.js
envjs-0.3.1 test/qunit.js
envjs-0.3.0 test/qunit.js
envjs-0.2.0 test/qunit.js
envjs-0.1.7 test/qunit.js
envjs-0.1.6 test/qunit.js
envjs-0.1.5 test/qunit.js
envjs-0.1.4 test/qunit.js
envjs-0.1.3 test/qunit.js
harmony-0.5.1 vendor/envjs/test/qunit.js
harmony-0.5 vendor/envjs/test/qunit.js
envjs-0.1.2 test/qunit.js
envjs-0.1.1 test/qunit.js