A pluggable, event-driven extension to QUnit
Anytime you want QUnit to communicate test results and status outside of the test runner’s frame. This might include:
There are two worlds we need to worry about:
This library embeds a tiny hidden test world in your app world, by running your qunit tests in an iframe. While in the app world, you will get notifications of what's happening in the test world by way of events.
This library is comprised of two halves
var client = new QUnitEventsClient({
testUrl: 'http://localhost:4200/tests' // test-runner URL
});
client.registerChangeListener(function(testState) {
// This function will be invoked whenever test state changes
// (i.e., a test passes or fails)
});
// We'll choose a DOM element inside which to place the test-runner frame
var $elem = $('.parent-to-create-iframe-in');
// Now, we'll create the iframe. Once it's set up, events will start firing
client.setupTestFrame($elem);
Support for additional features is in the works, including WebRTC and WebSocket support for classroom use.