Skip to content

Commit fb2f7b3

Browse files
authored
cleanup: Run force_svg_data_source_test only once. (#5955)
force_svg_data_source_test.ts is run multiple times in our test suite. We want to run it only one time. It gets run multiple times because it is grouped with tensorboard/webapp/feature_flag/testing.ts in the same tf_ts_library and thus is accidentally depended on by multiple karma test suite targets. This change refactors force_svg_data_source_test.ts into its own tf_ts_library and changes tensorboard/webapp/feature_flag:karma_test to explicitly depend on that library. Thus the force_svg_data_source_test.ts is run exactly once as part of feature flag tests.
1 parent f76fe6f commit fb2f7b3

File tree

1 file changed

+13
-4
lines changed
  • tensorboard/webapp/feature_flag

1 file changed

+13
-4
lines changed

tensorboard/webapp/feature_flag/BUILD

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,31 @@ tf_ts_library(
4545
name = "testing",
4646
testonly = True,
4747
srcs = [
48-
"force_svg_data_source_test.ts",
4948
"testing.ts",
5049
],
5150
deps = [
52-
":force_svg_data_source",
5351
":types",
54-
"//tensorboard/webapp/angular:expect_angular_core_testing",
5552
"//tensorboard/webapp/feature_flag/store:feature_flag_metadata",
56-
"//tensorboard/webapp/webapp_data_source:feature_flag_types",
53+
],
54+
)
55+
56+
tf_ts_library(
57+
name = "test_lib",
58+
testonly = True,
59+
srcs = [
60+
"force_svg_data_source_test.ts",
61+
],
62+
deps = [
63+
":force_svg_data_source",
64+
"//tensorboard/webapp/angular:expect_angular_core_testing",
5765
"@npm//@types/jasmine",
5866
],
5967
)
6068

6169
tf_ng_web_test_suite(
6270
name = "karma_test",
6371
deps = [
72+
":test_lib",
6473
"//tensorboard/webapp/feature_flag/effects:effects_test_lib",
6574
"//tensorboard/webapp/feature_flag/http:http_test_lib",
6675
"//tensorboard/webapp/feature_flag/store:store_test_lib",

0 commit comments

Comments
 (0)