On Thu, Mar 16, 2017 at 09:08:24PM -0400, Michael Layzell wrote:
Can we pass async functions everywhere where we use `add_task` in tests
already? If we can't, is there a tracking bug for converting all of the
test systems to support it?

Yes, add_task accepts any function which returns a promise, including async functions.

Can you `await` a function created with Task.async such as
`BrowserTestUtils.withNewTab` during the transition period?

Yes, you can await on any object with a Promise-like `then` method.

How about in ESR52? Will uplifting tests to ESR52 be a painful experience
due to having to use different tools to write the tests?

ESR52 supports async functions.

Can I pass an async function as the callback argument to things like
ContentTask.spawn and BrowserTestUtils.withNewTab? How about on ESR52?

Yes, they stringify in a way that's compatible with ContentTask.spawn, and withNewTab doesn't care what kind of function you pass it, so long as it returns a promise or generator.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to