facebook/jest — pull request #50 by ide (2014-05-22 21:39:06+00:00)
Title: Run jest with --harmony if it wasn't already doing so

Jest uses ES6 features in a couple of places. Right now I think it's just
WeakMaps but it would also be useful to test generators as well. ES6 is gated
behind the --harmony flag so we need to explicitly specify it when running jest.

The harmonize module tests to see if Node is currently running in ES6 mode. If
not, it spawns a Node child process with the same args and env as the parent but
with the --harmony flag.

Tested by running `./bin/jest.js -o` from a repo with some changes and didn't
get the crash that says: "Please run node with the --harmony flag!". (I got
another crash but that has to do with Haste).