mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-05-28 16:44:53 +08:00
update to modern code style (#1738)
* mv create-react-app/index.js -> create-react-app/creteReactApp.js * update to modern code style * var -> cosnt * set trailing-coma to es5 for prettier
This commit is contained in:
committed by
Dan Abramov
parent
43873dc9b8
commit
fe7b5c212b
18
packages/react-scripts/scripts/test.js
vendored
18
packages/react-scripts/scripts/test.js
vendored
@@ -8,7 +8,6 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
// @remove-on-eject-end
|
||||
|
||||
'use strict';
|
||||
|
||||
process.env.NODE_ENV = 'test';
|
||||
@@ -18,7 +17,7 @@ process.env.PUBLIC_URL = '';
|
||||
// if this file is missing. dotenv will never modify any environment variables
|
||||
// that have already been set.
|
||||
// https://github.com/motdotla/dotenv
|
||||
require('dotenv').config({silent: true});
|
||||
require('dotenv').config({ silent: true });
|
||||
|
||||
const jest = require('jest');
|
||||
const argv = process.argv.slice(2);
|
||||
@@ -33,10 +32,15 @@ if (!process.env.CI && argv.indexOf('--coverage') < 0) {
|
||||
const createJestConfig = require('./utils/createJestConfig');
|
||||
const path = require('path');
|
||||
const paths = require('../config/paths');
|
||||
argv.push('--config', JSON.stringify(createJestConfig(
|
||||
relativePath => path.resolve(__dirname, '..', relativePath),
|
||||
path.resolve(paths.appSrc, '..'),
|
||||
false
|
||||
)));
|
||||
argv.push(
|
||||
'--config',
|
||||
JSON.stringify(
|
||||
createJestConfig(
|
||||
relativePath => path.resolve(__dirname, '..', relativePath),
|
||||
path.resolve(paths.appSrc, '..'),
|
||||
false
|
||||
)
|
||||
)
|
||||
);
|
||||
// @remove-on-eject-end
|
||||
jest.run(argv);
|
||||
|
||||
Reference in New Issue
Block a user