Bug Tracker

Opened 11 years ago

Closed 11 years ago

#3364 closed feature (fixed)

qunit: Callback for external logger

Reported by: sugendran Owned by: joern
Priority: minor Milestone: 1.3
Component: qunit Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:

Description

A callback from the tester would be handy - I'm still not sure if it should be on every test or after all tests have run.

Firing it on every test seems to be the easiest approach, since it's just a matter of pushing the results into an array and then sending that array to the callback. (i have this in my version of the testrunner.js if anyone is interested)

Right now I'm using the callback to send the results to a backend page for logging (and possibly email, haven't decided yet) - basically I want it to be part of my auto build process.

Change History (1)

comment:1 Changed 11 years ago by joern

Resolution: fixed
Status: newclosed

You can define callbacks via QUnit.log and QUnit.done, eg.

QUnit.log = function(result, message) {};
QUnit.done = function(failures, total) {};
Note: See TracTickets for help on using tickets.