mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
c9415e4d75
Since we generate a `.mjs` file as entry-point for jasmine tests, a couple of issues prevented the transitive dependencies from bootstrap targets to be brought in (causing resolution errors): 1. The `_files` (previously `_esm2015`) targets are no longer needed, and they also miss all the information on runfiles. 2. The aspect for computing linker mappings does not respect the `bootstrap` attribute from the `spec_entrypoint` so we manually add the extract ESM output targets (this rule works with the aspect and forwards linker mappings). PR Close #48521
41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
|
|
|
|
ts_library(
|
|
name = "ngtsc_lib",
|
|
testonly = True,
|
|
srcs = glob(["**/*.ts"]),
|
|
deps = [
|
|
"//packages/compiler",
|
|
"//packages/compiler-cli",
|
|
"//packages/compiler-cli/src/ngtsc/core:api",
|
|
"//packages/compiler-cli/src/ngtsc/diagnostics",
|
|
"//packages/compiler-cli/src/ngtsc/file_system",
|
|
"//packages/compiler-cli/src/ngtsc/file_system/testing",
|
|
"//packages/compiler-cli/src/ngtsc/indexer",
|
|
"//packages/compiler-cli/src/ngtsc/reflection",
|
|
"//packages/compiler-cli/src/ngtsc/testing",
|
|
"//packages/compiler-cli/src/ngtsc/typecheck/api",
|
|
"//packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box",
|
|
"//packages/compiler-cli/src/ngtsc/util",
|
|
"//packages/compiler-cli/test:test_utils",
|
|
"@npm//source-map",
|
|
"@npm//tsickle",
|
|
"@npm//typescript",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "ngtsc",
|
|
timeout = "long",
|
|
bootstrap = ["//tools/testing:node_no_angular"],
|
|
data = [
|
|
"//packages/compiler-cli/src/ngtsc/testing/fake_common:npm_package",
|
|
"//packages/compiler-cli/src/ngtsc/testing/fake_core:npm_package",
|
|
],
|
|
shard_count = 4,
|
|
deps = [
|
|
":ngtsc_lib",
|
|
"@npm//yargs",
|
|
],
|
|
)
|