From 14551e801e6de64eaf8794e9a416b853451f1a4e Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 18 Jul 2019 16:55:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8C=89=E7=85=A7comment=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/utils.js | 2 +- test/widget/button.test.js | 1 + test/widget/text.test.js | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test/utils.js b/test/utils.js index b5927fa70..ca3437cb7 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 afc8b7dff..18faf06db 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 f49a17e8d..6085f7672 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(); }); });