mirror of
https://github.com/marko-js/marko.git
synced 2026-01-25 15:03:04 +00:00
16 lines
546 B
JavaScript
16 lines
546 B
JavaScript
var expect = require('chai').expect;
|
|
|
|
module.exports = function (helpers) {
|
|
var component = helpers.mount(require('./index'), {});
|
|
|
|
expect(helpers.targetEl.querySelector('h1') != null).to.equal(true);
|
|
expect(helpers.targetEl.querySelector('div') != null).to.equal(true);
|
|
|
|
component.state.show = false;
|
|
component.update();
|
|
|
|
expect(helpers.targetEl.querySelector('h1') == null).to.equal(true);
|
|
expect(helpers.targetEl.querySelector('div') == null).to.equal(true);
|
|
|
|
expect(component.isDestroyed()).to.equal(false);
|
|
}; |