forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 3
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 symbol tracking for
@defer
feature
This commit adds a bundling test, which also includes symbol tracking for `@defer` feature.
- Loading branch information
1 parent
ef90a90
commit 8118e0b
Showing
6 changed files
with
2,595 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,67 @@ | ||
load("//tools:defaults.bzl", "app_bundle", "jasmine_node_test", "ng_module", "ts_library") | ||
load("//tools/symbol-extractor:index.bzl", "js_expected_symbol_test") | ||
load("@npm//http-server:index.bzl", "http_server") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
ng_module( | ||
name = "defer", | ||
srcs = [ | ||
"defer.component.ts", | ||
"index.ts", | ||
], | ||
deps = [ | ||
"//packages/core", | ||
"//packages/platform-browser", | ||
], | ||
) | ||
|
||
app_bundle( | ||
name = "bundle", | ||
entry_point = ":index.ts", | ||
deps = [ | ||
":defer", | ||
"//packages/core", | ||
"//packages/platform-browser", | ||
"@npm//rxjs", | ||
], | ||
) | ||
|
||
ts_library( | ||
name = "test_lib", | ||
testonly = True, | ||
srcs = glob(["*_spec.ts"]), | ||
deps = [ | ||
"//packages:types", | ||
"//packages/compiler", | ||
"//packages/core/testing", | ||
"//packages/private/testing", | ||
"@npm//@bazel/runfiles", | ||
], | ||
) | ||
|
||
jasmine_node_test( | ||
name = "test", | ||
data = [ | ||
":bundle.debug.min.js", | ||
":bundle.js", | ||
":bundle.min.js", | ||
":bundle.min.js.br", | ||
], | ||
deps = [":test_lib"], | ||
) | ||
|
||
js_expected_symbol_test( | ||
name = "symbol_test", | ||
src = ":bundle.debug.min.js", | ||
golden = ":bundle.golden_symbols.json", | ||
) | ||
|
||
http_server( | ||
name = "devserver", | ||
data = [ | ||
"index.html", | ||
":bundle.debug.min.js", | ||
":bundle.min.js", | ||
], | ||
) |
Oops, something went wrong.