aboutsummaryrefslogtreecommitdiffstats
path: root/test/matchers.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/matchers.js')
-rw-r--r--test/matchers.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/matchers.js b/test/matchers.js
index 1e0ae92a..fd706d3c 100644
--- a/test/matchers.js
+++ b/test/matchers.js
@@ -36,6 +36,15 @@ beforeEach(function() {
toBeDirty: cssMatcher('ng-dirty', 'ng-pristine'),
toBePristine: cssMatcher('ng-pristine', 'ng-dirty'),
+ toEqual: function(expected) {
+ if (this.actual && this.actual.$$log) {
+ this.actual = (typeof expected === 'string')
+ ? this.actual.toString()
+ : this.actual.toArray();
+ }
+ return jasmine.Matchers.prototype.toEqual.call(this, expected);
+ },
+
toEqualData: function(expected) {
return angular.equals(this.actual, expected);
},