Skip to content

Instantly share code, notes, and snippets.

@reid
Created August 16, 2010 22:23
Show Gist options
  • Select an option

  • Save reid/527859 to your computer and use it in GitHub Desktop.

Select an option

Save reid/527859 to your computer and use it in GitHub Desktop.
// snippet fron inject.js
(function attachEventsToYUITest () {
if (!window.YUITest) return window.setTimeout(attachEventsToYUITest, 15);
var pulse = window.TestSwarm.heartbeat;
var Runner = window.YUITest.TestRunner;
Runner.on(Runner.BEGIN_EVENT, pulse);
Runner.on(Runner.TEST_PASS_EVENT, pulse);
Runner.on(Runner.TEST_FAIL_EVENT, pulse);
Runner.on(Runner.TEST_IGNORE_EVENT, pulse);
Runner.on(Runner.COMPLETE_EVENT, function (data) {
submit({
fail : data.failed,
error : data.ignored,
total : data.total
});
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment