@@ -44,9 +44,9 @@ shelljs.set('-e');
4444shelljs . cd ( projectDir ) ;
4545
4646// Extracts the supported command line options.
47- const { _ : components , local, firefox, watch} = minimist ( args , {
48- boolean : [ 'local' , 'firefox' , 'watch' ] ,
49- default : { watch : true } ,
47+ const { _ : components , local, firefox, watch, 'view-engine' : viewEngine } = minimist ( args , {
48+ boolean : [ 'local' , 'firefox' , 'watch' , 'view-engine' ] ,
49+ default : { watch : true , 'view-engine' : false } ,
5050} ) ;
5151
5252// Whether tests for all components should be run.
@@ -64,13 +64,14 @@ if (local && (components.length > 1 || all)) {
6464const bazelBinary = `yarn -s ${ watch ? 'ibazel' : 'bazel' } ` ;
6565const testTargetName =
6666 `unit_tests_${ local ? 'local' : firefox ? 'firefox-local' : 'chromium-local' } ` ;
67+ const configFlag = viewEngine ? '--config=view-engine' : '' ;
6768
6869// If `all` has been specified as component, we run tests for all components
6970// in the repository. The `--firefox` flag can be still specified.
7071if ( all ) {
7172 shelljs . exec (
7273 `${ bazelBinary } test //src/... --test_tag_filters=-e2e,-browser:${ testTargetName } ` +
73- `--build_tag_filters=-browser:${ testTargetName } --build_tests_only` ) ;
74+ `--build_tag_filters=-browser:${ testTargetName } --build_tests_only ${ configFlag } ` ) ;
7475 return ;
7576}
7677
@@ -92,7 +93,7 @@ const testLabels = components
9293 . map ( t => `${ getBazelPackageOfComponentName ( t ) } :${ testTargetName } ` ) ;
9394
9495// Runs Bazel for the determined test labels.
95- shelljs . exec ( `${ bazelBinary } ${ bazelAction } ${ testLabels . join ( ' ' ) } ` ) ;
96+ shelljs . exec ( `${ bazelBinary } ${ bazelAction } ${ testLabels . join ( ' ' ) } ${ configFlag } ` ) ;
9697
9798/**
9899 * Gets the Bazel package label for the specified component name. Throws if
0 commit comments