From:  Jim Blandy <jblandy@mozilla.com>
Date:  18 Aug 2017 07:01:32 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.tech.js-engine.internals
Subject:  

Marking tests for nightly-only features

NNTP-Posting-Host:  63.245.214.181

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:

http://searchfox.org/mozilla-central/rev/e8c36327cd8c9432c69e5e1383156a74330f11f2/js/src/jit-test/lib/nightly-only.js

The comments explain it pretty well:

// Some experimental features are enabled only on nightly builds, and
disabled
// on beta and release. Tests for these features should not simply disable
// themselves on all but nightly builds, because if we neglect to update
such
// 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.