We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a27d827 commit b6eb3faCopy full SHA for b6eb3fa
test/helpers/matchers.js
@@ -167,9 +167,13 @@ beforeEach(function() {
167
this.message = function() {
168
return "Expected '" + angular.mock.dump(this.actual) + "' to have class '" + clazz + "'.";
169
};
170
- return this.actual.hasClass ?
171
- this.actual.hasClass(clazz) :
172
- angular.element(this.actual).hasClass(clazz);
+ var classes = clazz.trim().split(/\s+/);
+ for (var i=0; i<classes.length; ++i) {
+ if (!jqLiteHasClass(this.actual[0], classes[i])) {
173
+ return false;
174
+ }
175
176
+ return true;
177
},
178
179
toThrowMatching: function(expected) {
0 commit comments