diff options
| author | Chirayu Krishnappa | 2013-08-06 21:53:51 -0700 | 
|---|---|---|
| committer | Chirayu Krishnappa | 2013-08-07 16:35:37 -0700 | 
| commit | 4be7612079f34c8b95c82f24b822e2ae06c82270 (patch) | |
| tree | 02a62a0d2771057e8d147322cd42d2da4f61d82d /test/matchers.js | |
| parent | 66007a4150a84980ae3578a1a6e542880bb7f408 (diff) | |
| download | angular.js-4be7612079f34c8b95c82f24b822e2ae06c82270.tar.bz2 | |
test(matchers): support 'not' text in toBeHidden matcher
Diffstat (limited to 'test/matchers.js')
| -rw-r--r-- | test/matchers.js | 6 | 
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);      }, | 
