diff options
| author | Ken Sheedlo | 2013-06-07 18:24:30 -0700 |
|---|---|---|
| committer | Igor Minar | 2013-06-17 13:29:30 -0700 |
| commit | 003861d2fdb37b83e1d0939d49b70fbc67766997 (patch) | |
| tree | dc53ff724097cc7485093bb43c2f3aa5f4377cb2 /test/ng/directive | |
| parent | 908071afbf32c46fe9110e4a67e104bbd4b3a56b (diff) | |
| download | angular.js-003861d2fdb37b83e1d0939d49b70fbc67766997.tar.bz2 | |
chore(minErr): replace ngError with minErr
Diffstat (limited to 'test/ng/directive')
| -rw-r--r-- | test/ng/directive/inputSpec.js | 6 | ||||
| -rw-r--r-- | test/ng/directive/ngRepeatSpec.js | 8 | ||||
| -rw-r--r-- | test/ng/directive/selectSpec.js | 5 |
3 files changed, 9 insertions, 10 deletions
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: <input( value="")? ng-model="1\+2">$/); + toMatch(/^\[ngModel:noass\] Expression '1\+2' is non\-assignable\. Element: <input( value="")? ng-model="1\+2">$/); })); @@ -457,7 +457,7 @@ describe('input', function() { expect(function() { compileInput('<input type="text" ng-model="throw \'\'">'); 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('<input type="text" ng-model="foo" ng-pattern="fooRegexp" />'); 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('<ul><li ng-repeat="i dont parse"></li></ul>'); $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('<ul><li ng-repeat="i dont parse in foo"></li></ul>'); $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('<select ng-model="selected" ng-options="i dont parse"></select>'); - }).toThrowNg("ngOptions error! Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in" + - " _collection_' but got 'i dont parse'."); + compile('<select ng-model="selected" ng-options="i dont parse"></select>'); + }).toThrowMatching(/^\[ngOptions:iexp\] Expected expression in form of/); }); |
