mirror of
https://github.com/marko-js/marko.git
synced 2026-01-25 15:03:04 +00:00
17 lines
622 B
JavaScript
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);
|
|
}; |