From 4f0f2437712a5ae3e79780e2d6fa32b70abe1a52 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Mon, 1 Jul 2013 17:23:24 -0700 Subject: fix($injector): refactor module loading code and use minErr --- test/AngularSpec.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/AngularSpec.js') diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 9686ffd6..8fda7a65 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -605,7 +605,9 @@ describe('angular', function() { expect(function() { angularInit(appElement, bootstrap); - }).toThrow("[$injector:nomod] Module 'doesntexist' is not available! You either misspelled the module name or forgot to load it."); + }).toThrowMatching( + /\[\$injector:modulerr] Failed to instantiate module doesntexist due to:\n.*\[\$injector:nomod] Module 'doesntexist' is not available! You either misspelled the module name or forgot to load it\./ + ); }); }); @@ -749,7 +751,8 @@ describe('angular', function() { expect(function() { angular.bootstrap(element, ['doesntexist']); - }).toThrow("[$injector:nomod] Module 'doesntexist' is not available! You either misspelled the module name or forgot to load it."); + }).toThrowMatching( + /\[\$injector:modulerr\] Failed to instantiate module doesntexist due to:\n.*\[\$injector:nomod\] Module 'doesntexist' is not available! You either misspelled the module name or forgot to load it\./); expect(element.html()).toBe('{{1+2}}'); dealoc(element); -- cgit v1.2.3