From 65e72e958efacdc5f4fc0e52d2ed635d2e5a53b2 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 9 Jan 2019 19:44:48 +0100 Subject: [PATCH] fix(bazel): protractor rule does not run spec files with underscore (#28022) There are various e2e tests with the `_spec.ts` suffix in the Angular project. Currently the protractor Bazel rule does not pick up these files and just ignores them. Since underscore is commonly used, we should support this. Needed for the conversion fo the `examples` to Bazel. PR Close #28022 --- packages/bazel/src/protractor/protractor.conf.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/bazel/src/protractor/protractor.conf.js b/packages/bazel/src/protractor/protractor.conf.js index 1c26660bcb..e7a3403b27 100644 --- a/packages/bazel/src/protractor/protractor.conf.js +++ b/packages/bazel/src/protractor/protractor.conf.js @@ -88,7 +88,8 @@ if (onPreparePath) { // ts_web_test_suite & rules_webtesting WEB_TEST_METADATA attributes setConf(conf, 'framework', 'jasmine2', 'is set to jasmine2'); -const specs = [TMPL_specs].map(s => require.resolve(s)).filter(s => /\b(spec|test)\.js$/.test(s)); +const specs = + [TMPL_specs].map(s => require.resolve(s)).filter(s => /(\b|_)(spec|test)\.js$/.test(s)); setConf(conf, 'specs', specs, 'are determined by the srcs and deps attribute');