mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
yarn test: Default to bleeding edge configuration (#21238)
My personal workflow is to develop against the www-modern release channel, with the variant flags enabled, because it encompasses the largest set of features. Then I rely on CI to run the tests against all the other configurations. So in practice, I almost always run ``` yarn test -r=www-modern --variant TEST_FILE ``` instead of ``` yarn test TEST_FILE ``` So, I've updated the `yarn test` command to use those options by default.
This commit is contained in:
parent
9d48779b36
commit
dd8552ae0d
|
|
@ -462,14 +462,14 @@ workflows:
|
||||||
- "-r=stable --env=production"
|
- "-r=stable --env=production"
|
||||||
- "-r=experimental --env=development"
|
- "-r=experimental --env=development"
|
||||||
- "-r=experimental --env=production"
|
- "-r=experimental --env=production"
|
||||||
- "-r=www-classic --env=development"
|
- "-r=www-classic --env=development --variant=false"
|
||||||
- "-r=www-classic --env=production"
|
- "-r=www-classic --env=production --variant=false"
|
||||||
- "-r=www-classic --env=development --variant"
|
- "-r=www-classic --env=development --variant=true"
|
||||||
- "-r=www-classic --env=production --variant"
|
- "-r=www-classic --env=production --variant=true"
|
||||||
- "-r=www-modern --env=development"
|
- "-r=www-modern --env=development --variant=false"
|
||||||
- "-r=www-modern --env=production"
|
- "-r=www-modern --env=production --variant=false"
|
||||||
- "-r=www-modern --env=development --variant"
|
- "-r=www-modern --env=development --variant=true"
|
||||||
- "-r=www-modern --env=production --variant"
|
- "-r=www-modern --env=production --variant=true"
|
||||||
|
|
||||||
# TODO: Test more persistent configurations?
|
# TODO: Test more persistent configurations?
|
||||||
- '-r=stable --env=development --persistent'
|
- '-r=stable --env=development --persistent'
|
||||||
|
|
@ -497,14 +497,14 @@ workflows:
|
||||||
- "--project=devtools -r=experimental"
|
- "--project=devtools -r=experimental"
|
||||||
|
|
||||||
# TODO: Update test config to support www build tests
|
# TODO: Update test config to support www build tests
|
||||||
# - "-r=www-classic --env=development"
|
# - "-r=www-classic --env=development --variant=false"
|
||||||
# - "-r=www-classic --env=production"
|
# - "-r=www-classic --env=production --variant=false"
|
||||||
# - "-r=www-classic --env=development --variant"
|
# - "-r=www-classic --env=development --variant=true"
|
||||||
# - "-r=www-classic --env=production --variant"
|
# - "-r=www-classic --env=production --variant=true"
|
||||||
# - "-r=www-modern --env=development"
|
# - "-r=www-modern --env=development --variant=false"
|
||||||
# - "-r=www-modern --env=production"
|
# - "-r=www-modern --env=production --variant=false"
|
||||||
# - "-r=www-modern --env=development --variant"
|
# - "-r=www-modern --env=development --variant=true"
|
||||||
# - "-r=www-modern --env=production --variant"
|
# - "-r=www-modern --env=production --variant=true"
|
||||||
|
|
||||||
# TODO: Test more persistent configurations?
|
# TODO: Test more persistent configurations?
|
||||||
- get_base_build:
|
- get_base_build:
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ const argv = yargs
|
||||||
describe: 'Run with the given release channel.',
|
describe: 'Run with the given release channel.',
|
||||||
requiresArg: true,
|
requiresArg: true,
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 'experimental',
|
default: 'www-modern',
|
||||||
choices: ['experimental', 'stable', 'www-classic', 'www-modern'],
|
choices: ['experimental', 'stable', 'www-classic', 'www-modern'],
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
|
|
@ -71,7 +71,6 @@ const argv = yargs
|
||||||
describe: 'Run with www variant set to true.',
|
describe: 'Run with www variant set to true.',
|
||||||
requiresArg: false,
|
requiresArg: false,
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
default: false,
|
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
alias: 'b',
|
alias: 'b',
|
||||||
|
|
@ -161,12 +160,19 @@ function validateOptions() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argv.variant && !isWWWConfig()) {
|
if (isWWWConfig()) {
|
||||||
|
if (argv.variant === undefined) {
|
||||||
|
// Turn internal experiments on by default
|
||||||
|
argv.variant = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (argv.variant) {
|
||||||
logError(
|
logError(
|
||||||
'Variant is only supported for the www release channels. Update these options to continue.'
|
'Variant is only supported for the www release channels. Update these options to continue.'
|
||||||
);
|
);
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (argv.build && argv.persistent) {
|
if (argv.build && argv.persistent) {
|
||||||
logError(
|
logError(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user