test: include router in public_api_guard tests (#22628)

Remove duplicate public api testing from the gulp task.

PR Close #22628
This commit is contained in:
Alex Eagle
2018-03-07 10:11:51 -08:00
parent ce649f725f
commit ad8fb8484f
2 changed files with 50 additions and 22 deletions

View File

@ -2,25 +2,61 @@ load("//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
[
ts_api_guardian_test(
name = "%s_api" % i.replace("/", "_"),
name = "%s_%s_api" % (
bundle[0],
bundle[1].replace("/", "_"),
),
actual = "packages/%s/npm_package/%s.d.ts" % (
i.split("/")[0],
"/".join(i.split("/")[1:]),
bundle[0],
bundle[1],
),
data = glob([
"%s/**/*.d.ts" % i.split("/")[0],
"%s/**/*.d.ts" % bundle[0],
]) + [
"//packages/%s:npm_package" % i.split("/")[0],
"//packages/%s:npm_package" % bundle[0],
],
golden = "tools/public_api_guard/%s.d.ts" % i,
golden = "tools/public_api_guard/%s/%s.d.ts" % (
bundle[0],
bundle[1],
),
)
for i in [
"core/core",
"core/testing",
"common/http/testing",
"common/common",
"common/http",
"common/testing",
for bundle in [
[
"core",
"core",
],
[
"core",
"testing",
],
[
"common",
"http/testing",
],
[
"common",
"common",
],
[
"common",
"http",
],
[
"common",
"testing",
],
[
"router",
"router",
],
[
"router",
"testing",
],
[
"router",
"upgrade",
],
# TODO(alexeagle): add remaining packages here once they have ng_package's
]
]