lundi 23 février 2015

Check for active class on element, unit testing

Im writing this test for a tabs component but seems does not working, is there an alternative to replace find()?



it('should set active class on tab', function() {
var contents = element.find('ul.nav-pills li.tab-overview');
expect(contents.eq(0)).toHaveClass('active');
expect(contents.eq(1)).not.toHaveClass('active');
});

Aucun commentaire:

Enregistrer un commentaire