'use strict' const { renderComponent } = require('../src') const { expect } = require('chai') const sinon = require('sinon') describe('renderComponent' , () => { let $el afterEach(() => { $el.dispose() }) it('works with elements', () => { $el = renderComponent({ template: '', viewModel() { this.greeting = 'Hello Component' } }) expect($el).to.exist expect($el.html()).contains('Hello Component') }) it('works with text nodes', () => { $el = renderComponent({ template: ` Hello Component ` }) expect($el).to.exist expect($el.html()).contains('Hello Component') }) it('should clean up after itself in the case of failure', () => { try { renderComponent({ template: '