Skip to content

Commit dd8552a

Browse files
authored
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.
1 parent 9d48779 commit dd8552a

File tree

2 files changed

+29
-23
lines changed

2 files changed

+29
-23
lines changed

.circleci/config.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -462,14 +462,14 @@ workflows:
462462
- "-r=stable --env=production"
463463
- "-r=experimental --env=development"
464464
- "-r=experimental --env=production"
465-
- "-r=www-classic --env=development"
466-
- "-r=www-classic --env=production"
467-
- "-r=www-classic --env=development --variant"
468-
- "-r=www-classic --env=production --variant"
469-
- "-r=www-modern --env=development"
470-
- "-r=www-modern --env=production"
471-
- "-r=www-modern --env=development --variant"
472-
- "-r=www-modern --env=production --variant"
465+
- "-r=www-classic --env=development --variant=false"
466+
- "-r=www-classic --env=production --variant=false"
467+
- "-r=www-classic --env=development --variant=true"
468+
- "-r=www-classic --env=production --variant=true"
469+
- "-r=www-modern --env=development --variant=false"
470+
- "-r=www-modern --env=production --variant=false"
471+
- "-r=www-modern --env=development --variant=true"
472+
- "-r=www-modern --env=production --variant=true"
473473

474474
# TODO: Test more persistent configurations?
475475
- '-r=stable --env=development --persistent'
@@ -497,14 +497,14 @@ workflows:
497497
- "--project=devtools -r=experimental"
498498

499499
# TODO: Update test config to support www build tests
500-
# - "-r=www-classic --env=development"
501-
# - "-r=www-classic --env=production"
502-
# - "-r=www-classic --env=development --variant"
503-
# - "-r=www-classic --env=production --variant"
504-
# - "-r=www-modern --env=development"
505-
# - "-r=www-modern --env=production"
506-
# - "-r=www-modern --env=development --variant"
507-
# - "-r=www-modern --env=production --variant"
500+
# - "-r=www-classic --env=development --variant=false"
501+
# - "-r=www-classic --env=production --variant=false"
502+
# - "-r=www-classic --env=development --variant=true"
503+
# - "-r=www-classic --env=production --variant=true"
504+
# - "-r=www-modern --env=development --variant=false"
505+
# - "-r=www-modern --env=production --variant=false"
506+
# - "-r=www-modern --env=development --variant=true"
507+
# - "-r=www-modern --env=production --variant=true"
508508

509509
# TODO: Test more persistent configurations?
510510
- get_base_build:

scripts/jest/jest-cli.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const argv = yargs
4444
describe: 'Run with the given release channel.',
4545
requiresArg: true,
4646
type: 'string',
47-
default: 'experimental',
47+
default: 'www-modern',
4848
choices: ['experimental', 'stable', 'www-classic', 'www-modern'],
4949
},
5050
env: {
@@ -71,7 +71,6 @@ const argv = yargs
7171
describe: 'Run with www variant set to true.',
7272
requiresArg: false,
7373
type: 'boolean',
74-
default: false,
7574
},
7675
build: {
7776
alias: 'b',
@@ -161,11 +160,18 @@ function validateOptions() {
161160
}
162161
}
163162

164-
if (argv.variant && !isWWWConfig()) {
165-
logError(
166-
'Variant is only supported for the www release channels. Update these options to continue.'
167-
);
168-
success = false;
163+
if (isWWWConfig()) {
164+
if (argv.variant === undefined) {
165+
// Turn internal experiments on by default
166+
argv.variant = true;
167+
}
168+
} else {
169+
if (argv.variant) {
170+
logError(
171+
'Variant is only supported for the www release channels. Update these options to continue.'
172+
);
173+
success = false;
174+
}
169175
}
170176

171177
if (argv.build && argv.persistent) {

0 commit comments

Comments
 (0)