data
data copied to clipboard
Async waiter should be turned on by default
A while back we added a waiter for requests, the ability to generate stack traces, and additional infra for helping prevent async test leakage. We should turn on the waiter (and most of this other infra) by default.
Can we re-evaluate the implementation (e.g. switch to using ember-test-waiters, which has direct @ember/test-helpers
integration)? Are we already using that?
@rwjblue this is different from
import { registerWaiter, unregisterWaiter } from '@ember/test';
?
Our current implementation is this:
this.__asyncWaiter = () => {
let shouldTrack = this.shouldTrackAsyncRequests;
let tracked = this._trackedAsyncRequests;
let isSettled = tracked.length === 0;
return shouldTrack !== true || isSettled;
};
registerWaiter(this.__asyncWaiter);
this is different from ... ?
Ya, the new API is better 😄 (and is compatible with older versions).
The repo README has info over in https://github.com/rwjblue/ember-test-waiters.
We moved the repo over to https://github.com/emberjs/ember-test-waiters.
going to hold off on this until pairing to refactor to new syntax to ensure the debug experience is as good as possible when something is left pending
@rwjblue we're going to move ahead with activating this since external waiters seem to not work as well in 4.x now that fetch is the default. We should still pair on that refactor though!!
This is now always on