Allow passing an optional timeout to Testability's whenStable(). If specified, if Angular is not stable before the timeout is hit, the done callback will be invoked with a list of pending macrotasks. Also, allows an optional update callback, which will be invoked whenever the set of pending macrotasks changes. If this callback returns true, the timeout will be cancelled and the done callback will not be invoked. If the optional parameters are not passed, whenStable() will work as it did before, whether or not the task tracking zone spec is available. This change also migrates the Testability unit tests off the deprecated AsyncTestCompleter. PR Close #16863
74 lines
1.9 KiB
Python
74 lines
1.9 KiB
Python
package(default_visibility = ["//visibility:public"])
|
|
|
|
exports_files([
|
|
"tsconfig.json",
|
|
"LICENSE",
|
|
])
|
|
|
|
# Developers should always run `bazel run :install`
|
|
# This ensures that package.json in subdirectories get installed as well.
|
|
alias(
|
|
name = "install",
|
|
actual = "@yarn//:yarn",
|
|
)
|
|
|
|
# This rule belongs in node_modules/BUILD
|
|
# It's here as a workaround for
|
|
# https://github.com/bazelbuild/bazel/issues/374#issuecomment-296217940
|
|
filegroup(
|
|
name = "node_modules",
|
|
# Performance workaround: list individual files
|
|
# Reduces the number of files as inputs to nodejs_binary:
|
|
# bazel query "deps(:node_modules)" | wc -l
|
|
# This won't scale in the general case.
|
|
# TODO(alexeagle): figure out what to do
|
|
srcs = glob(["/".join([
|
|
"node_modules",
|
|
pkg,
|
|
"**",
|
|
ext,
|
|
]) for pkg in [
|
|
"jasmine",
|
|
"typescript",
|
|
"zone.js",
|
|
"tsutils",
|
|
"@types",
|
|
"tsickle",
|
|
"hammerjs",
|
|
"protobufjs",
|
|
"bytebuffer",
|
|
"reflect-metadata",
|
|
"source-map-support",
|
|
"minimist",
|
|
"tslib",
|
|
] for ext in [
|
|
"*.js",
|
|
"*.json",
|
|
"*.d.ts",
|
|
]]),
|
|
)
|
|
|
|
filegroup(
|
|
name = "web_test_bootstrap_scripts",
|
|
# do not sort
|
|
srcs = [
|
|
"//:node_modules/reflect-metadata/Reflect.js",
|
|
"//:node_modules/zone.js/dist/zone.js",
|
|
"//:node_modules/zone.js/dist/async-test.js",
|
|
"//:node_modules/zone.js/dist/sync-test.js",
|
|
"//:node_modules/zone.js/dist/fake-async-test.js",
|
|
"//:node_modules/zone.js/dist/task-tracking.js",
|
|
"//:node_modules/zone.js/dist/proxy.js",
|
|
"//:node_modules/zone.js/dist/jasmine-patch.js",
|
|
],
|
|
)
|
|
|
|
filegroup(
|
|
name = "angularjs",
|
|
# do not sort
|
|
srcs = [
|
|
"//:node_modules/angular/angular.js",
|
|
"//:node_modules/angular-mocks/angular-mocks.js",
|
|
],
|
|
)
|