Browse Source

fix: 按照comment修改

master
windy 5 years ago
parent
commit
14551e801e
  1. 2
      test/utils.js
  2. 1
      test/widget/button.test.js
  3. 2
      test/widget/text.test.js

2
test/utils.js

@ -5,7 +5,7 @@
var widget = BI.createWidget(BI.extend(widgetJson, { var widget = BI.createWidget(BI.extend(widgetJson, {
root: true root: true
})); }));
widget._mount(); // widget._mount();
widget.element.appendTo("body"); widget.element.appendTo("body");
return widget; return widget;
} }

1
test/widget/button.test.js

@ -17,6 +17,7 @@ describe("ButtonTest", function () {
BI.nextTick(function () { BI.nextTick(function () {
button.element.click(); button.element.click();
expect(button.element.children(".bi-text").text()).to.equal("click"); expect(button.element.children(".bi-text").text()).to.equal("click");
button.destroy();
done(); done();
}); });

2
test/widget/text.test.js

@ -12,6 +12,7 @@ describe("TextTest", function () {
}); });
text.setText("AAA"); text.setText("AAA");
expect(text.element.text()).to.equal("AAA"); expect(text.element.text()).to.equal("AAA");
text.destroy();
}); });
/** /**
@ -23,5 +24,6 @@ describe("TextTest", function () {
}); });
text.setStyle({"color": "red"}); text.setStyle({"color": "red"});
expect(text.element.getStyle("color")).to.equal("rgb(255, 0, 0)"); expect(text.element.getStyle("color")).to.equal("rgb(255, 0, 0)");
text.destroy();
}); });
}); });

Loading…
Cancel
Save