From:  Jim Blandy <>
Date:  18 Aug 2017 07:01:32 Hong Kong Time

Marking tests for nightly-only features


I don't know how other SpiderMonkey folks work with this, but I added a
jit-test library function for marking tests for features that are enabled
only in nightly:

The comments explain it pretty well:

// Some experimental features are enabled only on nightly builds, and
// on beta and release. Tests for these features should not simply disable
// themselves on all but nightly builds, because if we neglect to update
// tests once the features cease to be experimental, we'll silently skip the
// tests on beta and release, even though they should run.

// Call the function f. On beta and release, expect it to throw an error
that is
// an instance of error.
function nightlyOnly(error, f) { ... }

I used this to mark up tests for async generators, like so:

nightlyOnly(g.SyntaxError, () => {
  g.eval("(async function* estux() { debugger; })().next();");
  assertEq(name, "estux");

Now that async generators have landed, I think there are no uses of
nightlyOnly in the code, but if you know of any tests of this sort, you
might consider using it. Otherwise, I guess it should be removed.