import { expect } from 'chai';

class {
    onMount() {
        window.app = this;
    }

    test() {
        expect(this.el.querySelector('.foo section.input').innerHTML).to.equal('Hello Frank');
        expect(this.el.querySelector('.foo section.renderBody').innerHTML).to.equal('Hello Frank');

        var foo = window.app.getComponent('foo');
        foo.forceUpdate();
        foo.update();

        expect(this.el.querySelector('.foo section.input').innerHTML).to.equal('Hello Frank');
        expect(this.el.querySelector('.foo section.renderBody').innerHTML).to.equal('Hello Frank');

        this.input = {
            name: 'John'
        };

        this.update();

        expect(this.el.querySelector('.foo section.input').innerHTML).to.equal('Hello John');
        expect(this.el.querySelector('.foo section.renderBody').innerHTML).to.equal('Hello John');
    }
}

<div>
    <foo key="foo">Hello ${input.name}</foo>
</div>
