@@ -44,9 +44,9 @@ shelljs.set('-e');
44
44
shelljs . cd ( projectDir ) ;
45
45
46
46
// 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 } ,
50
50
} ) ;
51
51
52
52
// Whether tests for all components should be run.
@@ -64,13 +64,14 @@ if (local && (components.length > 1 || all)) {
64
64
const bazelBinary = `yarn -s ${ watch ? 'ibazel' : 'bazel' } ` ;
65
65
const testTargetName =
66
66
`unit_tests_${ local ? 'local' : firefox ? 'firefox-local' : 'chromium-local' } ` ;
67
+ const configFlag = viewEngine ? '--config=view-engine' : '' ;
67
68
68
69
// If `all` has been specified as component, we run tests for all components
69
70
// in the repository. The `--firefox` flag can be still specified.
70
71
if ( all ) {
71
72
shelljs . exec (
72
73
`${ 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 } ` ) ;
74
75
return ;
75
76
}
76
77
@@ -92,7 +93,7 @@ const testLabels = components
92
93
. map ( t => `${ getBazelPackageOfComponentName ( t ) } :${ testTargetName } ` ) ;
93
94
94
95
// Runs Bazel for the determined test labels.
95
- shelljs . exec ( `${ bazelBinary } ${ bazelAction } ${ testLabels . join ( ' ' ) } ` ) ;
96
+ shelljs . exec ( `${ bazelBinary } ${ bazelAction } ${ testLabels . join ( ' ' ) } ${ configFlag } ` ) ;
96
97
97
98
/**
98
99
* Gets the Bazel package label for the specified component name. Throws if
0 commit comments