react/scripts/release/build-commands/run-automated-bundle-tests.js
Adrian Carolli 53ef71b8e8 Add bundle linting and tests to the release script (#11662)
* Add bundle linting and tests to the release script

 - add yarn lint-build
- use yarn lint-build in circle ci build.sh
- add yarn lint-build, yarn test-prod, yarn test-build, and yarn test-build-prod to the realse script

* Improve readability of release test messages

* Run prettier

* Updating package versions for release 16.2.0

* Seperate bundle specific tests

- Moved the runYarnTask into utils since its being used two files now
- Uncomment out checks I mistakenly committed

* Revert a bunch of version bump changes

Mistakenly commited by release script

* .js for consistency
2017-11-26 16:47:20 +00:00

31 lines
678 B
JavaScript

#!/usr/bin/env node
'use strict';
const {logPromise, runYarnTask} = require('../utils');
module.exports = async ({cwd}) => {
await logPromise(
runYarnTask(cwd, 'lint-build', 'Lint bundle failed'),
'Running ESLint on bundle'
);
await logPromise(
runYarnTask(
cwd,
'test-build',
'Jest tests on the bundle failed in development'
),
'Running Jest tests on the bundle in the development environment',
true
);
await logPromise(
runYarnTask(
cwd,
'test-build-prod',
'Jest tests on the bundle failed in production'
),
'Running Jest tests on the bundle in the production environment',
true
);
};