You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
I'm using Material Design in my app and now I'm writing unit tests using Jasmine & Karma.
When I try to compile and digest a md-tab component, it throws an error:
'undefined' is not a function (evaluating 'element.addClass.bind(element, 'md-tab-themed')')
Directive example: (I voluntary removed tab contents)
describe('MyDirective',function(){var$compile,$rootScope;beforeEach(module('ria.dev'));beforeEach(inject(function(_$compile_,_$rootScope_){$compile=_$compile_;$rootScope=_$rootScope_;}));describe('Fake Unit Test',function(){beforeEach(function(){element=$compile(angular.element('<my-directive></my-directive>'))($rootScope);$rootScope.$digest();// the digest() method fails});it('should be true',function(){expect(true).toBe(true);});});});
The error is: (this is the bind method that's undefined)
TypeError: 'undefined' is not a function (evaluating 'element.addClass.bind(element, 'md-tab-themed')')
at postLink (/xxx/bower_components/angular-material/angular-material.js:11071)
at /xxx/bower_components/angular/angular.js:8213