mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
17 lines
536 B
JavaScript
17 lines
536 B
JavaScript
var expect = require("chai").expect;
|
|
|
|
module.exports = function (helpers) {
|
|
var component = helpers.mount(require.resolve("./index"), {});
|
|
|
|
expect(helpers.targetEl.querySelector(".root") != null).to.equal(true);
|
|
|
|
expect(component.detachEvent).to.equal(undefined);
|
|
component.destroy();
|
|
|
|
expect(helpers.targetEl.querySelector(".root") != null).to.equal(true);
|
|
expect(component.detachEvent != null).to.equal(true);
|
|
|
|
component.detachEvent.detach();
|
|
expect(helpers.targetEl.querySelector(".root") == null).to.equal(true);
|
|
};
|