feat(upgrade): provide unit test helpers for wiring up injectors (#16848)
Adds two new helper functions that can be used when unit testing Angular services that depend upon upgraded AngularJS services, or vice versa. The functions return a module (AngularJS or NgModule) that is configured to wire up the Angular and AngularJS injectors without the need to actually bootstrap a full hybrid application. This makes it simpler and faster to unit test services. PR Close #16848
This commit is contained in:

committed by
Kara Erickson

parent
5e53956c2b
commit
3fb78aaacc
@ -17,10 +17,13 @@ def create_upgrade_example_targets(name, srcs, e2e_srcs, entry_module, assets =
|
||||
type_check = False,
|
||||
deps = [
|
||||
"@npm//@types/angular",
|
||||
"@npm//@types/jasmine",
|
||||
"//packages/core",
|
||||
"//packages/platform-browser",
|
||||
"//packages/platform-browser-dynamic",
|
||||
"//packages/upgrade/static",
|
||||
"//packages/core/testing",
|
||||
"//packages/upgrade/static/testing",
|
||||
],
|
||||
tsconfig = "//packages/examples/upgrade:tsconfig-build.json",
|
||||
)
|
||||
|
Reference in New Issue
Block a user