2017-11-22 16:46:18 -08:00

17 lines
622 B
JavaScript

var expect = require('chai').expect;
module.exports = function (helpers) {
var component = helpers.mount(require('./index'), {});
// var rootEl = component.el;
var helloComponent = component.getComponent('hello');
expect(component.getEl('root').querySelector('.hello') != null).to.equal(true);
// expect(helloComponent.el.parentNode).to.equal(rootEl);
component.state.insertEl = true;
component.state.count++;
component.update();
expect(component.getEl('root').querySelector('.hello') != null).to.equal(true);
expect(component.getComponent('hello')).to.equal(helloComponent);
};