aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChirayu Krishnappa2013-08-06 21:53:51 -0700
committerChirayu Krishnappa2013-08-07 16:35:37 -0700
commit4be7612079f34c8b95c82f24b822e2ae06c82270 (patch)
tree02a62a0d2771057e8d147322cd42d2da4f61d82d /test
parent66007a4150a84980ae3578a1a6e542880bb7f408 (diff)
downloadangular.js-4be7612079f34c8b95c82f24b822e2ae06c82270.tar.bz2
test(matchers): support 'not' text in toBeHidden matcher
Diffstat (limited to 'test')
-rw-r--r--test/matchers.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/matchers.js b/test/matchers.js
index ef89e3ee..b7d336b7 100644
--- a/test/matchers.js
+++ b/test/matchers.js
@@ -40,11 +40,13 @@ beforeEach(function() {
toBeDirty: cssMatcher('ng-dirty', 'ng-pristine'),
toBePristine: cssMatcher('ng-pristine', 'ng-dirty'),
toBeShown: function() {
- this.message = valueFn("Expected element to not have 'ng-hide' class");
+ this.message = valueFn(
+ "Expected element " + (this.isNot ? "": "not ") + "to have 'ng-hide' class");
return !isNgElementHidden(this.actual);
},
toBeHidden: function() {
- this.message = valueFn("Expected element to have 'ng-hide' class");
+ this.message = valueFn(
+ "Expected element " + (this.isNot ? "not ": "") + "to have 'ng-hide' class");
return isNgElementHidden(this.actual);
},