refactor(ivy): use context discovery in TestBed implementation (#26211)
PR Close #26211
This commit is contained in:

committed by
Miško Hevery

parent
39f42bad1c
commit
053bf27fb3
@ -110,7 +110,11 @@ export function getDirectives(target: {}): Array<{}> {
|
||||
return context.directives || [];
|
||||
}
|
||||
|
||||
function loadContext(target: {}): LContext {
|
||||
/**
|
||||
* Returns LContext associated with a target passed as an argument.
|
||||
* Throws if a given target doesn't have associated LContext.
|
||||
*/
|
||||
export function loadContext(target: {}): LContext {
|
||||
const context = getContext(target);
|
||||
if (!context) {
|
||||
throw new Error(
|
||||
|
Reference in New Issue
Block a user