diff --git a/test/utils.js b/test/utils.js index b5927fa709..ca3437cb78 100644 --- a/test/utils.js +++ b/test/utils.js @@ -5,7 +5,7 @@ var widget = BI.createWidget(BI.extend(widgetJson, { root: true })); - widget._mount(); + // widget._mount(); widget.element.appendTo("body"); return widget; } diff --git a/test/widget/button.test.js b/test/widget/button.test.js index afc8b7dff8..18faf06db6 100644 --- a/test/widget/button.test.js +++ b/test/widget/button.test.js @@ -17,6 +17,7 @@ describe("ButtonTest", function () { BI.nextTick(function () { button.element.click(); expect(button.element.children(".bi-text").text()).to.equal("click"); + button.destroy(); done(); }); diff --git a/test/widget/text.test.js b/test/widget/text.test.js index f49a17e8d6..6085f76720 100644 --- a/test/widget/text.test.js +++ b/test/widget/text.test.js @@ -12,6 +12,7 @@ describe("TextTest", function () { }); text.setText("AAA"); expect(text.element.text()).to.equal("AAA"); + text.destroy(); }); /** @@ -23,5 +24,6 @@ describe("TextTest", function () { }); text.setStyle({"color": "red"}); expect(text.element.getStyle("color")).to.equal("rgb(255, 0, 0)"); + text.destroy(); }); });