function(context, callback) {
    if (arguments.length === 1) {
      callback = context;
      context = null;
    }
    if (!this.waiters) {
      this.waiters = Ember.A();
    }
    this.waiters.push([context, callback]);
  }
function(context, callback) {
    if (arguments.length === 1) {
      callback = context;
      context = null;
    }
    if (!this.waiters) {
      this.waiters = Ember.A();
    }
    this.waiters.push([context, callback]);
  }
function ( context , callback ) { if ( arguments . length === 1 ) { callback = context ; context = null ; } if ( ! this . waiters ) { this . waiters = Ember . A ( ) ; } this . waiters . push ( [ context , callback ] ) ; }
This allows ember-testing to play nicely with other asynchronous
events, such as an application that is waiting for a CSS3
transition or an IndexDB transaction.

For example:

```javascript
Ember.Test.registerWaiter(function() {
return myPendingTransactions() == 0;
});
```
The `context` argument allows you to optionally specify the `this`
with which your callback will be invoked.

For example:

```javascript
Ember.Test.registerWaiter(MyDB, MyDB.hasPendingTransactions);
```

@public
@method registerWaiter
@param {Object} context (optional)
@param {Function} callback
This allows ember - testing to play nicely with other asynchronous events such as an application that is waiting for a CSS3 transition or an IndexDB transaction .