From 003861d2fdb37b83e1d0939d49b70fbc67766997 Mon Sep 17 00:00:00 2001 From: Ken Sheedlo Date: Fri, 7 Jun 2013 18:24:30 -0700 Subject: chore(minErr): replace ngError with minErr --- test/ng/compileSpec.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'test/ng/compileSpec.js') diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 99c0a6ad..8b48ea08 100755 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -632,11 +632,11 @@ describe('$compile', function() { inject(function($compile) { expect(function() { $compile('

'); - }).toThrow("[NgErr12] Template for directive 'noRootElem' must have exactly one root element."); + }).toThrow("[$compile:tplrt] Template for directive 'noRootElem' must have exactly one root element. "); expect(function() { $compile('

'); - }).toThrow("[NgErr12] Template for directive 'multiRootElem' must have exactly one root element."); + }).toThrow("[$compile:tplrt] Template for directive 'multiRootElem' must have exactly one root element. "); // ws is ok expect(function() { @@ -985,7 +985,7 @@ describe('$compile', function() { expect(function() { $httpBackend.flush(); - }).toThrow('[NgErr17] Failed to load template: hello.html'); + }).toThrow('[$compile:tpload] Failed to load template: hello.html'); expect(sortedHtml(element)).toBe('
'); } )); @@ -1005,7 +1005,7 @@ describe('$compile', function() { inject(function($compile){ expect(function() { $compile('
'); - }).toThrow('[NgErr18] Multiple directives [sync, async] asking for template on: '+ + }).toThrow('[$compile:multidir] Multiple directives [sync, async] asking for template on: '+ '
'); }); }); @@ -1189,14 +1189,14 @@ describe('$compile', function() { $compile('

'); $rootScope.$digest(); expect($exceptionHandler.errors.pop().message). - toBe("[NgErr16] Template for directive 'template' must have exactly one root element. Template: template.html"); + toBe("[$compile:tplrt] Template for directive 'template' must have exactly one root element. template.html"); // multi root $templateCache.put('template.html', '
'); $compile('

'); $rootScope.$digest(); expect($exceptionHandler.errors.pop().message). - toBe("[NgErr16] Template for directive 'template' must have exactly one root element. Template: template.html"); + toBe("[$compile:tplrt] Template for directive 'template' must have exactly one root element. template.html"); // ws is ok $templateCache.put('template.html', '
\n'); @@ -1456,7 +1456,7 @@ describe('$compile', function() { function($rootScope, $compile) { expect(function(){ $compile('
'); - }).toThrow('[NgErr18] Multiple directives [iscopeA, scopeB] asking for isolated scope on: ' + + }).toThrow('[$compile:multidir] Multiple directives [iscopeA, scopeB] asking for isolated scope on: ' + '
'); }) ); @@ -1466,7 +1466,7 @@ describe('$compile', function() { function($rootScope, $compile) { expect(function(){ $compile('
'); - }).toThrow('[NgErr18] Multiple directives [iscopeA, iscopeB] asking for isolated scope on: ' + + }).toThrow('[$compile:multidir] Multiple directives [iscopeA, iscopeB] asking for isolated scope on: ' + '
'); }) ); @@ -2074,7 +2074,7 @@ describe('$compile', function() { componentScope.ref = 'ignore me'; expect($rootScope.$apply). - toThrow("[NgErr14] Expression ''hello ' + name' used with directive 'myComponent' is non-assignable!"); + toThrow("[$compile:noass] Expression ''hello ' + name' used with directive 'myComponent' is non-assignable!"); expect(componentScope.ref).toBe('hello world'); // reset since the exception was rethrown which prevented phase clearing $rootScope.$$phase = null; @@ -2150,7 +2150,7 @@ describe('$compile', function() { it('should throw on unknown definition', inject(function() { expect(function() { compile('
'); - }).toThrow("[NgErr15] Invalid isolate scope definition for directive 'badDeclaration'. Definition: {... attr: 'xxx' ...}"); + }).toThrow("[$compile:iscp] Invalid isolate scope definition for directive 'badDeclaration'. Definition: {... attr: 'xxx' ...}"); })); it('should expose a $$isolateBindings property onto the scope', inject(function() { @@ -2247,7 +2247,7 @@ describe('$compile', function() { inject(function(log, $compile, $rootScope) { expect(function() { $compile('
')($rootScope); - }).toThrow("[NgErr13] Controller 'main', required by directive 'dep', can't be found!"); + }).toThrow("[$compile:ctreq] Controller 'main', required by directive 'dep', can't be found!"); }); }); @@ -2434,7 +2434,7 @@ describe('$compile', function() { inject(function($compile) { expect(function() { $compile('
'); - }).toThrow('[NgErr18] Multiple directives [first, second] asking for transclusion on: ' + + }).toThrow('[$compile:multidir] Multiple directives [first, second] asking for transclusion on: ' + '
'); }); }); @@ -2816,7 +2816,7 @@ describe('$compile', function() { '
' + '' + '
'); - }).toThrow("[NgErr51] Unterminated attribute, found 'foo-start' but no matching 'foo-end' found."); + }).toThrow("[$compile:utrat] Unterminated attribute, found 'foo-start' but no matching 'foo-end' found."); }); }); @@ -2834,7 +2834,7 @@ describe('$compile', function() { '
' + '' + '
'); - }).toThrow("[NgErr51] Unterminated attribute, found 'foo-start' but no matching 'foo-end' found."); + }).toThrow("[$compile:utrat] Unterminated attribute, found 'foo-start' but no matching 'foo-end' found."); }); }); -- cgit v1.2.3