diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/AngularSpec.js | 12 | ||||
| -rw-r--r-- | test/InjectorSpec.js | 30 |
2 files changed, 0 insertions, 42 deletions
diff --git a/test/AngularSpec.js b/test/AngularSpec.js index e14f2e27..4579000d 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -389,18 +389,6 @@ describe('angular', function() { })('svc2')).toEqual('svc2-svc1'); }); - it('should eagerly instantiate a service if $eager is true', function() { - var log = []; - angular.injector(function($provide){ - $provide.service('svc1', function() { - this.$get = function(){ - log.push('svc1'); - } - this.$eager = true; - }); - }); - expect(log).toEqual(['svc1']); - }); }); diff --git a/test/InjectorSpec.js b/test/InjectorSpec.js index ac412c39..6c0e9668 100644 --- a/test/InjectorSpec.js +++ b/test/InjectorSpec.js @@ -67,20 +67,6 @@ describe('injector', function() { }).toThrow("Unknown provider for 'idontexist' <- 'a' <- 'b'."); }); - it('should autostart eager services', function() { - var log = ''; - injector = createInjector([function($provide){ - $provide.service('eager', function() { - this.$eager = true; - this.$get = function(){ - log += 'eager;'; - return 'foo'; - }; - }); - }]); - expect(log).toEqual('eager;'); - expect(injector('eager')).toBe('foo'); - }); describe('invoke', function() { var args; @@ -440,20 +426,4 @@ describe('injector', function() { }).toThrow('MyError'); }); }); - - describe('$eager', function(){ - it('should eagerly instantiate a service if $eager is true', function() { - var log = []; - createInjector([function($provide){ - $provide.service('svc1', function() { - this.$get = function(){ - log.push('svc1'); - } - this.$eager = true; - }); - }]); - expect(log).toEqual(['svc1']); - }); - }); - }); |
