Skip to content

Commit

Permalink
test: setup circular dependency tests for all entry points (angular#3…
Browse files Browse the repository at this point in the history
…4774)

Sets up circular dependency tests for all entry-points in the
project (except for the ones part of a deprecated package).

PR Close angular#34774
  • Loading branch information
devversion authored and sonukapoor committed Feb 13, 2020
1 parent 4c1ceda commit 8c11e45
Show file tree
Hide file tree
Showing 24 changed files with 204 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/animations/browser/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/animations/browser/index.js",
deps = ["//packages/animations/browser"],
)

circular_dependency_test(
name = "testing_circular_deps_test",
entry_point = "angular/packages/animations/browser/testing/index.js",
deps = ["//packages/animations/browser/testing"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/animations/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/animations/index.js",
deps = ["//packages/animations"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/common/http/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/common/http/index.js",
deps = ["//packages/common/http"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/common/http/testing/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/common/http/testing/index.js",
deps = ["//packages/common/http/testing"],
)

ts_library(
name = "test_lib",
Expand Down
13 changes: 13 additions & 0 deletions packages/common/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/common/index.js",
deps = ["//packages/common"],
)

circular_dependency_test(
name = "testing_circular_deps_test",
entry_point = "angular/packages/common/testing/index.js",
deps = ["//packages/common/testing"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/common/upgrade/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/common/upgrade/index.js",
deps = ["//packages/common/upgrade"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/compiler/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

# Test that should only be run in node
NODE_ONLY = [
Expand All @@ -10,6 +11,12 @@ UTILS = [
"aot/test_util.ts",
]

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/compiler/index.js",
deps = ["//packages/compiler"],
)

ts_library(
name = "test_utils",
testonly = True,
Expand Down
13 changes: 13 additions & 0 deletions packages/core/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

package(default_visibility = ["//visibility:public"])

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/core/index.js",
deps = ["//packages/core"],
)

circular_dependency_test(
name = "testing_circular_deps_test",
entry_point = "angular/packages/core/testing/index.js",
deps = ["//packages/core/testing"],
)

ts_library(
name = "test_lib",
testonly = True,
Expand Down
7 changes: 7 additions & 0 deletions packages/elements/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/elements/index.js",
deps = ["//packages/elements"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/forms/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/forms/index.js",
deps = ["//packages/forms"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/language-service/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/language-service/index.js",
deps = ["//packages/language-service"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/localize/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/localize/index.js",
deps = ["//packages/localize"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/platform-browser-dynamic/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/platform-browser-dynamic/index.js",
deps = ["//packages/platform-browser-dynamic"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/platform-browser/animations/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/platform-browser/animations/index.js",
deps = ["//packages/platform-browser/animations"],
)

ts_library(
name = "test_lib",
Expand Down
13 changes: 13 additions & 0 deletions packages/platform-browser/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

exports_files([
"browser/static_assets/200.html",
"static_assets/test.html",
])

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/platform-browser/index.js",
deps = ["//packages/platform-browser"],
)

circular_dependency_test(
name = "testing_circular_deps_test",
entry_point = "angular/packages/platform-browser/testing/index.js",
deps = ["//packages/platform-browser/testing"],
)

ts_library(
name = "test_lib",
testonly = True,
Expand Down
13 changes: 13 additions & 0 deletions packages/platform-server/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/platform-server/index.js",
deps = ["//packages/platform-server"],
)

circular_dependency_test(
name = "testing_circular_deps_test",
entry_point = "angular/packages/platform-server/testing/index.js",
deps = ["//packages/platform-server/testing"],
)

ts_library(
name = "test_lib",
Expand Down
13 changes: 13 additions & 0 deletions packages/router/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/router/index.js",
deps = ["//packages/router"],
)

circular_dependency_test(
name = "testing_circular_deps_test",
entry_point = "angular/packages/router/testing/index.js",
deps = ["//packages/router/testing"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/router/upgrade/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/router/upgrade/index.js",
deps = ["//packages/router/upgrade"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/service-worker/config/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/service-worker/config/index.js",
deps = ["//packages/service-worker/config"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/service-worker/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/service-worker/index.js",
deps = ["//packages/service-worker"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/service-worker/worker/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/service-worker/worker/main.js",
deps = ["//packages/service-worker/worker:main"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/upgrade/src/common/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/upgrade/index.js",
deps = ["//packages/upgrade"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/upgrade/static/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/upgrade/static/index.js",
deps = ["//packages/upgrade/static"],
)

ts_library(
name = "test_lib",
Expand Down
7 changes: 7 additions & 0 deletions packages/upgrade/static/testing/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
package(default_visibility = ["//visibility:public"])

load("//tools:defaults.bzl", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")

circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/upgrade/static/testing/index.js",
deps = ["//packages/upgrade/static/testing"],
)

ts_library(
name = "test_lib",
Expand Down

0 comments on commit 8c11e45

Please sign in to comment.