Uncopypasta

Depends on #170 and #171. Read https://github.com/facebook/jest/commit/024439c8a0b12c54ffb555f28e82922cc2df76a6 directly to see sans dependencies.