I already transitioned my web application to use Node 7.8 (V8 5.5) and therefore have native async..await available. How do I make Ava use it too instead of transform-regenerator
See the ES2017 Support section of the documentation. If you already have a babel config you want applied to your test, use the babel: "inherit" option. If you want to disable babel, you could do:
"ava": {
"babel": {
"presets": []
}
}
That supplies an empty config, which essentially tells babel to "do nothing". AVA will still add a few transforms, but nothing related to async / await.
I don't think we use transform-regenerator anymore, since we're now only targeting Node.js versions with generator support.
When Node.js 8 comes out we'll update our transforms and we'll no longer transpile async/await for those Node.js versions.
This should be fixed by https://github.com/avajs/ava/commit/e45695197c8ba5d0ec7df7a7fe38f00f9a5f5fb0.
@novemberborn so which features still need to be transpiled when relying on Node 8 ? I thought moving to Node 8 removes the need for babel completely :)
@medikoo The import/export syntax: https://github.com/avajs/babel-preset-stage-4/blob/master/plugins/8.json We also use Babel in AVA itself to detect incorrect usage of t.throws(). And there will soon be more: https://github.com/avajs/babel-preset-stage-4/issues/7 JS is constantly evolving and there will always be features not even available in the latest engines.
hi all. love the project--you're doing great work.
i'd really love to dodge the transpile step _for at least my source_ s.t. debugging is less roundabout:
i _think_ this could be as simple as getting some config to babel to _ignore my stuff_. wow-wee that'd be incredible! is that something you're open to?
good news! its seem as though the system _doesn't_ transpile code if you use pure runtime goodies! woo hoo! now, i have a native debug experience in VSCode

JS is constantly evolving and there will always be features not even available in the latest engines.
@sindresorhus wouldn't it be better to just use what's available natively, without compilation overhead (?) There's actually quite big cost behind that. Is it worth it? Isn't what's natively available good enough?
@medikoo tests should work across Node.js versions. We want you to be able to use the latest syntax in your tests, even if you're developing for Node.js 6 or 4.