Test#onInjectHelpers()

onInjectHelpers (callback) public

Defined in packages/ember-testing/lib/test/on_inject_helpers.js:3

Used to register callbacks to be fired whenever App.injectTestHelpers is called.

The callback will receive the current application as an argument.

Example:

Ember.Test.onInjectHelpers(function() {
  Ember.$(document).ajaxSend(function() {
    Test.pendingRequests++;
  });

  Ember.$(document).ajaxComplete(function() {
    Test.pendingRequests--;
  });
});

Parameters:

callback Function
The function to be called.
doc_EmberJs
2016-11-30 16:53:41
Comments
Leave a Comment

Please login to continue.