20 ms·
Can you tell me a use case using the "action" that's sent to "request.run", or is it passed just because it can be. https://github.com/mozilla/gecko-dev/blob/
by dyscrete 10y ago
Can you tell me a use case using the "action" that's sent to
"request.run", or is it passed just because it can be.
https://github.com/mozilla/gecko-dev/blob/master/devtools/client/shared/redux/middleware/wait-service.js#L51 https://github.com/mozilla/gecko-dev/blob/master/devtools/cl...
- jlongster 10y agoIf you are waiting for a "done" async action (which is usually the case if using this), you might want the action to inspect the value that it was resolved with. We use this in tests: https://github.com/mozilla/gecko-dev/blob/master/devtools/client/debugger/test/mochitest/head.js#L1234 https://github.com/mozilla/gecko-dev/blob/master/devtools/cl... Tests can wait for an action to be dispatched and the promise is resolved with that action, and tests can inspect it.