-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(core): add a symbols test for renderer2 code
- Loading branch information
Showing
5 changed files
with
4,211 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
load("//tools:defaults.bzl", "ts_library", "ng_module") | ||
load("//tools/symbol-extractor:index.bzl", "js_expected_symbol_test") | ||
load("//packages/bazel/src:ng_rollup_bundle.bzl", "ng_rollup_bundle") | ||
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test") | ||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver") | ||
|
||
ng_module( | ||
name = "hello_world", | ||
srcs = ["index.ts"], | ||
deps = [ | ||
"//packages/core", | ||
"//packages/platform-browser-dynamic", | ||
], | ||
) | ||
|
||
ng_rollup_bundle( | ||
name = "bundle", | ||
# TODO(alexeagle): This is inconsistent. | ||
# We try to teach users to always have their workspace at the start of a | ||
# path, to disambiguate from other workspaces. | ||
# Here, the rule implementation is looking in an execroot where the layout | ||
# has an "external" directory for external dependencies. | ||
# This should probably start with "angular/" and let the rule deal with it. | ||
entry_point = "packages/core/test/bundling/hello_world_r2/index.js", | ||
deps = [ | ||
":hello_world", | ||
"//packages/core", | ||
"//packages/platform-browser-dynamic", | ||
], | ||
) | ||
|
||
ts_library( | ||
name = "test_lib", | ||
testonly = 1, | ||
srcs = glob(["*_spec.ts"]), | ||
deps = [ | ||
"//packages:types", | ||
"//packages/core/testing", | ||
], | ||
) | ||
|
||
jasmine_node_test( | ||
name = "test", | ||
data = [ | ||
":bundle", | ||
":bundle.js", | ||
":bundle.min.js.brotli", | ||
":bundle.min_debug.js", | ||
], | ||
deps = [":test_lib"], | ||
) | ||
|
||
js_expected_symbol_test( | ||
name = "symbol_test", | ||
src = ":bundle.min_debug.js", | ||
golden = ":bundle.golden_symbols.json", | ||
) | ||
|
||
ts_devserver( | ||
name = "devserver", | ||
static_files = [ | ||
":bundle.min_debug.js", | ||
":bundle.min.js", | ||
"index.html", | ||
], | ||
deps = [], | ||
) |
Oops, something went wrong.