Test#registerHelper()

registerHelper (name, helperMethod, options) public

Defined in packages/ember-testing/lib/test/helpers.js:5

registerHelper is used to register a test helper that will be injected when App.injectTestHelpers is called.

The helper method will always be called with the current Application as the first parameter.

For example:

Ember.Test.registerHelper('boot', function(app) {
  Ember.run(app, app.advanceReadiness);
});

This helper can later be called without arguments because it will be called with app as the first parameter.

App = Ember.Application.create();
App.injectTestHelpers();
boot();

Parameters:

name String
The name of the helper method to add.
helperMethod Function
options Object
doc_EmberJs
2016-11-30 16:53:42
Comments
Leave a Comment

Please login to continue.