Test#registerWaiter()

registerWaiter (context, callback) public

Defined in packages/ember-testing/lib/test/waiters.js:7
Available since 1.2.0

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:

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:

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

Parameters:

context Object
(optional)
callback Function
doc_EmberJs
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.