Open runspired opened 1 year ago
@machty could we expose a test helper instead for this that would do something similar?
I'm not sure what to recommend here; I don't think EC is alone in recommending use of cancelTimers, and lots of folk doing custom long-polling solutions are probably using cancelTimers. If there is some community convention surrounding this, I'm happy to recommend it.
Using run.foo
is deprecated, and since this is not public API, I think we should probably at least wrap it in a test helper or something. Not sure if that shields us properly from the deprecation or not.
Ember.run.cancelTimers
is not a public API but is recommended here: https://ember-concurrency.com/docs/testing-debuggingIt's not even documented as a private API: https://api.emberjs.com/ember/release/modules/@ember%2Frunloop Nor is it documented as part of Backburner's API https://github.com/BackburnerJS/backburner.js/tree/master