diff options
| author | Igor Minar | 2013-05-24 11:00:14 -0700 |
|---|---|---|
| committer | Vojta Jina | 2013-05-24 17:03:21 -0700 |
| commit | b8ea7f6aba2e675b85826b0bee1f21ddd7b866a5 (patch) | |
| tree | f3b34e25e27d088bec9b698b246d49f86281de36 /test/ng/parseSpec.js | |
| parent | 88eaea8e7bf025a7805a5d20f5d47472e4f26f6f (diff) | |
| download | angular.js-b8ea7f6aba2e675b85826b0bee1f21ddd7b866a5.tar.bz2 | |
feat(ngError): add error message compression and better error messages
- add toThrowNg matcher
Diffstat (limited to 'test/ng/parseSpec.js')
| -rw-r--r-- | test/ng/parseSpec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/ng/parseSpec.js b/test/ng/parseSpec.js index 7d3315b3..c3cb0ce1 100644 --- a/test/ng/parseSpec.js +++ b/test/ng/parseSpec.js @@ -156,11 +156,11 @@ describe('parser', function() { it('should throws exception for invalid exponent', function() { expect(function() { lex("0.5E-"); - }).toThrow(new Error('Lexer Error: Invalid exponent at column 4 in expression [0.5E-].')); + }).toThrow(new Error('[NgErr23] Lexer Error: Invalid exponent at column 4 in expression [0.5E-].')); expect(function() { lex("0.5E-A"); - }).toThrow(new Error('Lexer Error: Invalid exponent at column 4 in expression [0.5E-A].')); + }).toThrow(new Error('[NgErr23] Lexer Error: Invalid exponent at column 4 in expression [0.5E-A].')); }); it('should tokenize number starting with a dot', function() { @@ -171,7 +171,7 @@ describe('parser', function() { it('should throw error on invalid unicode', function() { expect(function() { lex("'\\u1''bla'"); - }).toThrow(new Error("Lexer Error: Invalid unicode escape [\\u1''b] at column 2 in expression ['\\u1''bla'].")); + }).toThrow(new Error("[NgErr23] Lexer Error: Invalid unicode escape [\\u1''b] at column 2 in expression ['\\u1''bla'].")); }); }); @@ -304,7 +304,7 @@ describe('parser', function() { expect(function() { scope.$eval("1|nonexistent"); - }).toThrow(new Error("Unknown provider: nonexistentFilterProvider <- nonexistentFilter")); + }).toThrow(new Error("[NgErr1] Unknown provider: nonexistentFilterProvider <- nonexistentFilter")); scope.offset = 3; expect(scope.$eval("'abcd'|substring:1:offset")).toEqual("bc"); @@ -492,7 +492,7 @@ describe('parser', function() { it('should throw exception on non-closed bracket', function() { expect(function() { scope.$eval('[].count('); - }).toThrow('Unexpected end of expression: [].count('); + }).toThrow('[NgErr25] Unexpected end of expression: [].count('); }); it('should evaluate double negation', function() { |
