build: run example unit tests with bazel (#28703)
With #28402 we updated the `examples` package to be built and tested with Bazel. This PR was only intended for the e2e integration tests, and there still seem to be a few unit tests that need to be migrated to Bazel until we can remove the legacy local unit tests job. PR Close #28703
This commit is contained in:
parent
05c25ccca7
commit
bcdd4b5729
|
@ -1,7 +1,7 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//packages/bazel:index.bzl", "protractor_web_test_suite")
|
||||
load("//tools:defaults.bzl", "ng_module", "ts_library")
|
||||
load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "ts_library")
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver")
|
||||
|
||||
ng_module(
|
||||
|
@ -26,6 +26,19 @@ ng_module(
|
|||
],
|
||||
)
|
||||
|
||||
ts_library(
|
||||
name = "core_tests_lib",
|
||||
testonly = True,
|
||||
srcs = glob(
|
||||
["**/*_spec.ts"],
|
||||
exclude = ["**/e2e_test/*"],
|
||||
),
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"//packages/core/testing",
|
||||
],
|
||||
)
|
||||
|
||||
ts_library(
|
||||
name = "core_e2e_tests_lib",
|
||||
testonly = True,
|
||||
|
@ -65,3 +78,12 @@ protractor_web_test_suite(
|
|||
"@ngdeps//selenium-webdriver",
|
||||
],
|
||||
)
|
||||
|
||||
jasmine_node_test(
|
||||
name = "test",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
deps = [
|
||||
":core_tests_lib",
|
||||
"//tools/testing:node",
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue