Skip to content

Commit

Permalink
feat(testing/utils): add $injector mock
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotell committed Jan 3, 2016
1 parent 786d176 commit dcb39b3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/testing/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,16 @@ export function linkFnMocks( scope, element, attrs ) {

}

/**
* @internal
* @returns {any}
*/
export function getNg1InjectorMock(): ng.auto.IInjectorService {
return {
instantiate( classFactory ){
return new classFactory();
}
} as ng.auto.IInjectorService;
}


0 comments on commit dcb39b3

Please sign in to comment.