Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs recommend using a private Ember API for test cleanup #525

Open
runspired opened this issue Apr 14, 2023 · 3 comments
Open

Docs recommend using a private Ember API for test cleanup #525

runspired opened this issue Apr 14, 2023 · 3 comments

Comments

@runspired
Copy link

Ember.run.cancelTimers is not a public API but is recommended here: https://ember-concurrency.com/docs/testing-debugging

It'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

@RobbieTheWagner
Copy link

@machty could we expose a test helper instead for this that would do something similar?

@machty
Copy link
Owner

machty commented Apr 18, 2023

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.

@RobbieTheWagner
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants