aboutsummaryrefslogtreecommitdiffstats
path: root/test/testabilityPatch.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/testabilityPatch.js')
-rw-r--r--test/testabilityPatch.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js
index 955dccfa..47bc0d0d 100644
--- a/test/testabilityPatch.js
+++ b/test/testabilityPatch.js
@@ -22,6 +22,19 @@ beforeEach(function(){
return "Expected to not have class 'ng-validation-error' but found.";
};
return !hasClass;
+ },
+
+ toEqualData: function(expected) {
+ return equals(this.actual, expected);
+ },
+
+ toHaveClass: function(clazz) {
+ this.message = function(){
+ return "Expected '" + sortedHtml(this.actual) + "' to have class '" + clazz + "'.";
+ };
+ return this.actual.hasClass ?
+ this.actual.hasClass(clazz) :
+ jqLite(this.actual).hasClass(clazz);
}
});
});
@@ -194,3 +207,9 @@ function click(element) {
JQLite.prototype.trigger.call(element, 'click');
}
}
+
+function rethrow(e) {
+ if(e) {
+ throw e;
+ }
+}