I'm new to unit testing and need some help in making a test pass!
disposeContainer() {
const element = this.parentElement.querySelector('.programmes');
if (element) {
parentElement.removeChild(element);
}
}
is the test i want to pass,
and here is my attempt!
it('should dispose a container', () => {
section.show('citv');
assert.equal(document.querySelector('.programmes ').remove);
});
not totally sure what i'm doing wrong (or right for that matter) havent spent a lot of time testing and would love for someone to explain to me the best practice here. t
thanks!
Aucun commentaire:
Enregistrer un commentaire