I have test which should check if element html rendered by my factory is correct, however this element contains material icon and it seems to be impossible to compare it in this test.
Simplified test case:
describe( 'Compile: ', function () {
it( 'show that those two html strings are the equal', function () {
var mockEl = $( '<i class="material-icons"></i>' )
;
expect( mockEl.html() ).toBe(
'<i class="material-icons"></i>'
);
} );
} );
In result I test throws error: Expected '' to be '<i class="material-icons"></i>'.
EDIT: Have the same error when use innerHTML
instead jQuery (just in case)
Aucun commentaire:
Enregistrer un commentaire