aboutsummaryrefslogtreecommitdiffstats
path: root/test/InjectorSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/InjectorSpec.js')
-rw-r--r--test/InjectorSpec.js8
1 files changed, 7 insertions, 1 deletions
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});