mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
15 lines
493 B
JavaScript
15 lines
493 B
JavaScript
var expect = require("chai").expect;
|
|
|
|
module.exports = function (helpers) {
|
|
var component = helpers.mount(require.resolve("./index"), {});
|
|
|
|
expect(helpers.targetEl.querySelector("h1") != null).to.equal(true);
|
|
expect(helpers.targetEl.querySelector("div") != null).to.equal(true);
|
|
|
|
component.state.showHeader = false;
|
|
component.update();
|
|
|
|
expect(helpers.targetEl.querySelector("h1") == null).to.equal(true);
|
|
expect(helpers.targetEl.querySelector("div") != null).to.equal(true);
|
|
};
|