Skip to content

Instantly share code, notes, and snippets.

@RyanHirsch
Created December 14, 2015 13:32
Show Gist options
  • Select an option

  • Save RyanHirsch/3bbbbe88cdfe15bbcfe5 to your computer and use it in GitHub Desktop.

Select an option

Save RyanHirsch/3bbbbe88cdfe15bbcfe5 to your computer and use it in GitHub Desktop.
Ember async test helper for use with content editable
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