angular/packages/core/test/compiler/BUILD.bazel
Paul Gschwendtner c9415e4d75 build: ensure bootstrap transitive runfiles are made available (#48521)
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
2022-12-19 19:50:41 +00:00

30 lines
577 B
Text

load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
package(default_visibility = ["//visibility:private"])
ts_library(
name = "compiler_lib",
testonly = True,
srcs = glob(
["**/*.ts"],
),
deps = [
"//packages/core/src/compiler",
"//packages/core/src/util",
],
)
jasmine_node_test(
name = "compiler",
bootstrap = ["//tools/testing:node"],
deps = [
":compiler_lib",
],
)
karma_web_test_suite(
name = "compiler_web",
deps = [
":compiler_lib",
],
)