The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Testing Underscores

Testing Underscores

1:27
AngularJS injectors understand aliased for core injectables such as `$rootScope` in unit tests. If you surround your injected object with underscores `_$rootScope_` it will be understood and injected into your test by Angular. This allows you to use a local alias of the same name.
Watch this lesson now
Avatar
egghead.io

AngularJS injectors understand aliased for core injectables such as $rootScope in unit tests. If you surround your injected object with underscores _$rootScope_ it will be understood and injected into your test by Angular. This allows you to use a local alias of the same name.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?