Class Ember.Test
public| Defined in: | packages/ember-testing/lib/test.js:26 |
|---|---|
| Module: | ember |
onInjectHelpers (callback) public
| Module: | ember |
|---|
Defined in packages/ember-testing/lib/test/on_inject_helpers.js:3
- callback
- Function
- The function to be called.
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--;
});
}); promise (resolver, label) public
| Module: | ember |
|---|
Defined in packages/ember-testing/lib/test/promise.js:19
- resolver
- Function
- The function used to resolve the promise.
- label
- String
- An optional string for identifying the promise.
This returns a thenable tailored for testing. It catches failed onSuccess callbacks and invokes the Ember.Test.adapter.exception callback in the last chained then.
This method should be returned by async helpers such as wait.
resolve (The) public
| Module: | ember |
|---|
Defined in packages/ember-testing/lib/test/promise.js:37
Available since v1.2.0
- The
- Mixed
- value to resolve
Replacement for Ember.RSVP.resolve The only difference is this uses an instance of Ember.Test.Promise
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/2.18/classes/Ember.Test/methods