Closed arv closed 8 years ago
@johnjbarton The feature tests now run all test/feature/AsyncFunctions
twice. Once with whatever options are set in the prolog and once where we override the options to transform to generators. The code for this is pretty ugly. Suggestions welcome.
Regarding the two-pass tests, duplicating the files with different options is not a horrible alternative and probably makes the system simpler. But it's ok this way.
LGTM
There is also one more complication and that is that we need to detect if there is native support for generators. For example Node 0.10 does not have generators. I thought of doing some optional skip directive fur the test runner...
I ended up duplicating the test and adding support for conditional skip to the feature test runner. I also changed the options slightly, so that if --generator=parse
then we generate code that contains generators.
This is done by setting
--async-functions=generator --generators=parse
.Related to #1231 Fixes #1780