From 03dd8c4f4c462cb5a5a08faf3cca6946dd3815f2 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 25 Oct 2011 21:28:48 -0700 Subject: feat(injector): Service look up failures include dependency path --- test/InjectorSpec.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/InjectorSpec.js b/test/InjectorSpec.js index 39b20392..fe1993e5 100644 --- a/test/InjectorSpec.js +++ b/test/InjectorSpec.js @@ -62,12 +62,18 @@ describe('injector', function() { }); - it('should provide usefull message if no provider', function() { + it('should provide useful message if no provider', function() { expect(function() { injector('idontexist'); }).toThrow("Unknown provider for 'idontexist'."); }); + it('should proved path to the missing provider', function(){ + expect(function() { + injector('idontexist', ['a', 'b']); + }).toThrow("Unknown provider for 'idontexist' <- 'a' <- 'b'."); + }); + it('should autostart eager services', function() { var log = ''; providers('eager', function() {log += 'eager;'; return 'foo';}, {$eager: true}); -- cgit v1.2.3