3// Do this as the first thing so that any code reading it knows the right env.
4process.env.BABEL_ENV = 'test';
5process.env.NODE_ENV = 'test';
6process.env.PUBLIC_URL = '';
8// Makes the script crash on unhandled rejections instead of silently
9// ignoring them. In the future, promise rejections that are not handled will
10// terminate the Node.js process with a non-zero exit code.
11process.on('unhandledRejection', err => {
15// Ensure environment variables are read.
16require('../config/env');
19const jest = require('jest');
20const execSync = require('child_process').execSync;
21let argv = process.argv.slice(2);
23function isInGitRepository() {
25 execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' });
32function isInMercurialRepository() {
34 execSync('hg --cwd . root', { stdio: 'ignore' });
41// Watch unless on CI or explicitly running all tests
44 argv.indexOf('--watchAll') === -1
46 // https://github.com/facebook/create-react-app/issues/5210
47 const hasSourceControl = isInGitRepository() || isInMercurialRepository();
48 argv.push(hasSourceControl ? '--watch' : '--watchAll');
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list