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/directive/inputSpec.js | 6 +++--- test/ng/directive/ngRepeatSpec.js | 8 ++++---- test/ng/directive/selectSpec.js | 5 ++--- 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'test/ng/directive') diff --git a/test/ng/directive/inputSpec.js b/test/ng/directive/inputSpec.js index 68caf1f5..5e1b26af 100644 --- a/test/ng/directive/inputSpec.js +++ b/test/ng/directive/inputSpec.js @@ -43,7 +43,7 @@ describe('NgModelController', function() { } expect(exception.message). - toMatch(/^\[NgErr6\] ngModel error! Expression '1\+2' is non\-assignable\. Element: $/); + toMatch(/^\[ngModel:noass\] Expression '1\+2' is non\-assignable\. Element: $/); })); @@ -457,7 +457,7 @@ describe('input', function() { expect(function() { compileInput(''); scope.$digest(); - }).toThrow("[NgErr24] Syntax Error: Token '''' is an unexpected token at column 7 of the expression [throw ''] starting at ['']."); + }).toThrow("[$parse:syntax] Syntax Error: Token '''' is an unexpected token at column 7 of the expression [throw ''] starting at ['']."); }); @@ -552,7 +552,7 @@ describe('input', function() { expect(function() { compileInput(''); scope.$apply(); - }).toThrowNg('ngPattern error! Expected fooRegexp to be a RegExp but was undefined.'); + }).toThrowMatching(/^\[ngPattern:noregexp\] Expected fooRegexp to be a RegExp but was/); }); }); diff --git a/test/ng/directive/ngRepeatSpec.js b/test/ng/directive/ngRepeatSpec.js index 2a0d5284..9fc445ba 100644 --- a/test/ng/directive/ngRepeatSpec.js +++ b/test/ng/directive/ngRepeatSpec.js @@ -269,7 +269,7 @@ describe('ngRepeat', function() { element = jqLite(''); $compile(element)(scope); expect($exceptionHandler.errors.shift()[0].message). - toBe("[NgErr7] ngRepeat error! Expected expression in form of '_item_ in _collection_[ track by _id_]' but got 'i dont parse'."); + toBe("[ngRepeat:iexp] Expected expression in form of '_item_ in _collection_[ track by _id_]' but got 'i dont parse'."); }); @@ -277,7 +277,7 @@ describe('ngRepeat', function() { element = jqLite(''); $compile(element)(scope); expect($exceptionHandler.errors.shift()[0].message). - toBe("[NgErr8] ngRepeat error! '_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got 'i dont parse'."); + toBe("[ngRepeat:iidexp] '_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got 'i dont parse'."); }); @@ -481,7 +481,7 @@ describe('ngRepeat', function() { scope.items = [a, a, a]; scope.$digest(); expect($exceptionHandler.errors.shift().message). - toEqual("[NgErr50] ngRepeat error! Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: item in items, Duplicate key: object:003"); + toEqual("[ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: item in items, Duplicate key: object:003"); // recover scope.items = [a]; @@ -501,7 +501,7 @@ describe('ngRepeat', function() { scope.items = [d, d, d]; scope.$digest(); expect($exceptionHandler.errors.shift().message). - toEqual("[NgErr50] ngRepeat error! Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: item in items, Duplicate key: object:009"); + toEqual("[ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: item in items, Duplicate key: object:009"); // recover scope.items = [a]; diff --git a/test/ng/directive/selectSpec.js b/test/ng/directive/selectSpec.js index 5a168f53..5be7eb65 100644 --- a/test/ng/directive/selectSpec.js +++ b/test/ng/directive/selectSpec.js @@ -493,9 +493,8 @@ describe('select', function() { it('should throw when not formated "? for ? in ?"', function() { expect(function() { - compile(''); - }).toThrowNg("ngOptions error! Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in" + - " _collection_' but got 'i dont parse'."); + compile(''); + }).toThrowMatching(/^\[ngOptions:iexp\] Expected expression in form of/); }); -- cgit v1.2.3