test(language-service): differentiate feature and internal infra tests (#35688)

This commit differentiates language service feature and language service
infrastructure tests. This is primarily to make testing of different
components at the development level easier. This commit continues a
small effort to expand our test coverage and normalize testing
structure.

Also adds test coverage to language service tests. We have quite a bit
to go on that front 🙂.

PR Close #35688
This commit is contained in:
ayazhafiz 2020-02-26 07:56:15 -08:00 committed by atscott
parent 5e38056459
commit 73ee57a6e3
1 changed files with 64 additions and 5 deletions

View File

@ -8,32 +8,90 @@ circular_dependency_test(
) )
ts_library( ts_library(
name = "test_lib", name = "test_utils_lib",
testonly = True,
srcs = [
"test_utils.ts",
],
deps = [
"//packages/compiler",
"//packages/compiler-cli/test:test_utils",
"//packages/language-service",
"@npm//typescript",
],
)
ts_library(
name = "features_test_lib",
testonly = True, testonly = True,
srcs = [ srcs = [
"completions_spec.ts", "completions_spec.ts",
"definitions_spec.ts", "definitions_spec.ts",
"diagnostics_spec.ts", "diagnostics_spec.ts",
"global_symbols_spec.ts",
"hover_spec.ts", "hover_spec.ts",
],
data = glob(["project/**/*"]),
deps = [
":test_utils_lib",
"//packages/language-service",
"@npm//typescript",
],
)
ts_library(
name = "infra_test_lib",
testonly = True,
srcs = [
"global_symbols_spec.ts",
"html_info_spec.ts", "html_info_spec.ts",
"language_service_spec.ts", "language_service_spec.ts",
"reflector_host_spec.ts", "reflector_host_spec.ts",
"template_spec.ts", "template_spec.ts",
"test_utils.ts",
"ts_plugin_spec.ts", "ts_plugin_spec.ts",
"typescript_host_spec.ts", "typescript_host_spec.ts",
"utils_spec.ts", "utils_spec.ts",
], ],
data = glob(["project/**/*"]), data = glob(["project/**/*"]),
deps = [ deps = [
":test_utils_lib",
"//packages/compiler", "//packages/compiler",
"//packages/compiler-cli/test:test_utils",
"//packages/language-service", "//packages/language-service",
"@npm//typescript", "@npm//typescript",
], ],
) )
jasmine_node_test(
name = "features_test",
data = [
"//packages/common:npm_package",
"//packages/core:npm_package",
"//packages/forms:npm_package",
],
tags = [
# the language service is not yet compatible with Ivy
"no-ivy-aot",
],
deps = [
":features_test_lib",
],
)
jasmine_node_test(
name = "infra_test",
data = [
"//packages/common:npm_package",
"//packages/core:npm_package",
"//packages/forms:npm_package",
],
tags = [
# the language service is not yet compatible with Ivy
"no-ivy-aot",
],
deps = [
":infra_test_lib",
],
)
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
data = [ data = [
@ -46,7 +104,8 @@ jasmine_node_test(
"no-ivy-aot", "no-ivy-aot",
], ],
deps = [ deps = [
":test_lib", ":features_test_lib",
":infra_test_lib",
], ],
) )