Alex Rickabaugh a7155bc2fa test(language-service): move existing tests to legacy directory (#39594)
In preparation for in-memory testing infrastructure, the existing Ivy
language service tests are moved to a `legacy` directory. These existing
tests rely on a single integration project in `test/project/app`, which
presents a number of challenges:

 * adding extra fields/properties to the integration project for one test
   can cause others to fail/flake.
 * it's especially difficult to test any cases that require introducing
   intentional errors, as those tend to break other tests.
 * tests load files from disk, which is slower.
 * tests rely on the real built versions of @angular/core and
   @angular/common, which makes them both slow to build and require rebuilds
   on every compiler change.
 * tests share a single tsconfig.json, making it extremely difficult to test
   how the language service handles different configuration scenarios (e.g.
   different type-checking flags).

PR Close #39594
2020-11-17 11:59:56 -08:00

34 lines
925 B
Python

load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
ts_library(
name = "legacy_lib",
testonly = True,
srcs = glob(["*.ts"]),
deps = [
"//packages/compiler",
"//packages/language-service/ivy",
"@npm//typescript",
],
)
jasmine_node_test(
name = "legacy",
data = [
# Note that we used to depend on the npm_package of common, core, and
# forms, but this is no longer the case. We did it for View Engine
# because we wanted to load the flat dts, which is only available in the
# npm_package. Ivy does not currently produce flat dts, so we might
# as well just depend on the outputs of ng_module.
"//packages/common",
"//packages/core",
"//packages/forms",
"//packages/language-service/test:project",
],
tags = [
"ivy-only",
],
deps = [
":legacy_lib",
],
)