As far as I understand glimmer, embers new rendering engine, has a kind of virtual-dom implementation which is diffing for changes and updates the UI accordingly to those changes. To gain some speed in our tests I thought, it should be possible to use this this virtual dom to test a component without rendering it in the browser/phantomjs. In my normal integration tests I would do something like this:
it('shows a textarea', function(){
this.render(hbs`{{my-component}}`); // don't render here
const $textarea = this.$('textarea');
expect($textarea).to.have.length(1);
});
So my question is if there is a way to access this virtual dom in a unit/integration test.
Thanks
Aucun commentaire:
Enregistrer un commentaire