diff options
Diffstat (limited to 'test/matchers.js')
| -rw-r--r-- | test/matchers.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/matchers.js b/test/matchers.js index 8e4be118..13d284e6 100644 --- a/test/matchers.js +++ b/test/matchers.js @@ -147,8 +147,12 @@ beforeEach(function() { return this.actual.hasClass ? this.actual.hasClass(clazz) : angular.element(this.actual).hasClass(clazz); - } + }, + toThrowNg: function(expected) { + return jasmine.Matchers.prototype.toThrow.call(this, new RegExp('\\[NgErr\\d*\\] ' + + expected.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"))); + } }); }); |
