mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit migrates the remaining pieces of `compiler-cli` to `ts_project`. This involves a few more things during migration: - the `ng_module` ngc_wrapped rule broke as part of this change, so we switched it to `ts_project` too. This logic is soon gone anyway. - we needed an extra pnpm "package.json" for the linker babel test. This test is loading from the real compiler-cli npm package. Babel needs a real node module for this, so this solution seems reasonable. It may be worth exploring in the future to move this test into an integration test though. - the older integrationtest in compiler-cli is removed as the coverage is much better with the compliance test suite and this test. PR Close #61826
155 lines
3.1 KiB
Text
155 lines
3.1 KiB
Text
load("//tools:defaults.bzl", "jasmine_node_test")
|
|
load("//tools:defaults2.bzl", "ts_project")
|
|
|
|
# Uses separate test rules to allow the tests to run in parallel
|
|
|
|
ts_project(
|
|
name = "test_utils",
|
|
testonly = True,
|
|
srcs = [
|
|
"mocks.ts",
|
|
"test_support.ts",
|
|
],
|
|
interop_deps = [
|
|
"//packages:types",
|
|
"//packages/compiler",
|
|
"//packages/compiler-cli",
|
|
"//packages/compiler-cli/src/ngtsc/file_system",
|
|
"//packages/compiler-cli/src/ngtsc/testing",
|
|
],
|
|
visibility = [
|
|
":__subpackages__",
|
|
"//packages/compiler-cli/src/ngtsc/transform/jit/test:__pkg__",
|
|
"//packages/language-service/test:__subpackages__",
|
|
],
|
|
deps = [
|
|
"//:node_modules/typescript",
|
|
],
|
|
)
|
|
|
|
# extract_18n_spec
|
|
ts_project(
|
|
name = "extract_i18n_lib",
|
|
testonly = True,
|
|
srcs = [
|
|
"extract_i18n_spec.ts",
|
|
],
|
|
interop_deps = [
|
|
":test_utils",
|
|
"//packages/compiler",
|
|
"//packages/compiler-cli",
|
|
],
|
|
deps = [
|
|
"//:node_modules/typescript",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "extract_i18n",
|
|
bootstrap = ["//tools/testing:node"],
|
|
data = [
|
|
"//packages/core:npm_package",
|
|
],
|
|
deps = [
|
|
":extract_i18n_lib",
|
|
"//packages/common:npm_package",
|
|
"//packages/core",
|
|
"@npm//yargs",
|
|
],
|
|
)
|
|
|
|
# perform_watch_spec
|
|
ts_project(
|
|
name = "perform_watch_lib",
|
|
testonly = True,
|
|
srcs = [
|
|
"perform_watch_spec.ts",
|
|
],
|
|
interop_deps = [
|
|
":test_utils",
|
|
"//packages/compiler",
|
|
"//packages/compiler-cli",
|
|
"//packages/private/testing",
|
|
],
|
|
deps = [
|
|
"//:node_modules/typescript",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "perform_watch",
|
|
bootstrap = ["//tools/testing:node"],
|
|
data = [
|
|
"//packages/core:npm_package",
|
|
],
|
|
deps = [
|
|
":perform_watch_lib",
|
|
"//packages/core",
|
|
],
|
|
)
|
|
|
|
# perform_compile_spec
|
|
ts_project(
|
|
name = "perform_compile_lib",
|
|
testonly = True,
|
|
srcs = [
|
|
"perform_compile_spec.ts",
|
|
],
|
|
interop_deps = [
|
|
":test_utils",
|
|
"//packages/compiler",
|
|
"//packages/compiler-cli",
|
|
],
|
|
deps = [
|
|
"//:node_modules/typescript",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "perform_compile",
|
|
bootstrap = ["//tools/testing:node"],
|
|
data = [
|
|
"//packages/core:npm_package",
|
|
],
|
|
deps = [
|
|
":perform_compile_lib",
|
|
"//packages/core",
|
|
],
|
|
)
|
|
|
|
ts_project(
|
|
name = "typescript_support_lib",
|
|
testonly = True,
|
|
srcs = [
|
|
"typescript_support_spec.ts",
|
|
],
|
|
interop_deps = [
|
|
"//packages/compiler-cli",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "typescript_support",
|
|
bootstrap = ["//tools/testing:node"],
|
|
deps = [
|
|
":typescript_support_lib",
|
|
],
|
|
)
|
|
|
|
# version_helpers_spec
|
|
ts_project(
|
|
name = "version_helpers_lib",
|
|
testonly = True,
|
|
srcs = ["version_helpers_spec.ts"],
|
|
interop_deps = [
|
|
"//packages/compiler-cli",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "version_helpers",
|
|
bootstrap = ["//tools/testing:node"],
|
|
deps = [
|
|
":version_helpers_lib",
|
|
],
|
|
)
|