Sha256: 3aa853b2028678f1e55a408c78df33590fb62e06441a663f8bc3091ef1d24d8a

Contents?: true

Size: 982 Bytes

Versions: 7

Compression:

Stored size: 982 Bytes

Contents

/* this snippet will save qunit test information in an object called 
* window.results and window.errors .
* Use this in conjunction with tuev to get detailed testing output */

QUnit.log = function(result_object, qunit_message) {
  message =  result_object.result ? "ok      " : "FAILED  ";
  message += result_object.message;
  if(!result_object.result && result_object.expected){
    message += "\n-----------------------8<-------------------------"
    message += "\nexpected: " + result_object.expected;
    message += "\nbut got:  " + result_object.actual;
    message += "\nsource:   " + result_object.source;
    message += "\n----------------------->8-------------------------\n"
    window.errors.push(message);
  }
  window.results.push(message);

  if (window.console && window.console.log) {
    window.console.log(message);
  }                                            
}; 
if(!window.results) {
  window.results = [];
}
if(!window.errors) {
  window.errors = [];
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tuev-0.7.1 contrib/tuev_qunit.js
tuev-0.6.2 contrib/tuev_qunit.js
tuev-0.5.1 contrib/tuev_qunit.js
tuev-0.5.0 contrib/tuev_qunit.js
tuev-0.4.2 contrib/tuev_qunit.js
tuev-0.4.1 contrib/tuev_qunit.js
tuev-0.4.0 contrib/tuev_qunit.js