8
में element.find() वर्ग द्वारा उपयोग करते हुए जब यह परीक्षण चल रहा है, मैं त्रुटि Expected undefined to be true.
कोणीय इकाई परीक्षण
it('should have the right classes', function() {
// this doesnt work
expect(element.find('.exampleClass').hasClass('ng-hide')).toBe(true);
// but this works
expect(element.find('span').hasClass('ng-hide')).toBe(true);
});
मैं jqlite का उपयोग कैसे id
और class
द्वारा एक तत्व को खोजने के लिए कर सकते हैं बार आ रही है?
आप नहीं कर सकते द्वारा लुकअप तक सीमित है। jqLite चयनकर्ताओं का समर्थन नहीं करता है – Phil