Skip to content

Commit

Permalink
test(core): add symbol tracking for @defer feature
Browse files Browse the repository at this point in the history
This commit adds a bundling test, which also includes symbol tracking for `@defer` feature.
  • Loading branch information
AndrewKushnir committed Oct 6, 2023
1 parent ef90a90 commit 8118e0b
Show file tree
Hide file tree
Showing 6 changed files with 2,595 additions and 0 deletions.
67 changes: 67 additions & 0 deletions packages/core/test/bundling/defer/BUILD.bazel
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",
],
)
Loading

0 comments on commit 8118e0b

Please sign in to comment.