Created
December 14, 2015 13:32
-
-
Save RyanHirsch/3bbbbe88cdfe15bbcfe5 to your computer and use it in GitHub Desktop.
Ember async test helper for use with content editable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default Ember.Test.registerAsyncHelper('setElementHTML', function(app, selector, value) { | |
| return new Ember.Test.promise(function(resolve) { | |
| Ember.Test.adapter.asyncStart(); | |
| Ember.$(selector).html(value); | |
| Ember.run.later(() => resolve(), 100); | |
| Ember.Test.adapter.asyncEnd(); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment