Skip to content

Commit

Permalink
change tests
Browse files Browse the repository at this point in the history
  • Loading branch information
warmhug committed Jan 15, 2015
1 parent 7b97ebe commit 8c989b2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/index.md
Expand Up @@ -36,7 +36,7 @@ var titleRight = <span>sub menu <i className="fa fa-caret-right pull-right"></i>
var leftMenu = (
<Menu activeKey="10" onSelect={handleSelect}>
<MenuItem key="10" onSelect={handleSelect}>onSelect</MenuItem>
<MenuItem key="31" href="http://www.baidu.com" >outer</MenuItem>
<MenuItem key="31" href="http://www.baidu.com" onSelect={handleSelect}>outer</MenuItem>
<SubMenu title={titleRight}>
<Menu>
<MenuItem key="31">inner inner</MenuItem>
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "rc-menu",
"version": "1.0.1",
"version": "1.0.2",
"description": "menu ui component for react",
"keywords": [
"react",
Expand Down
6 changes: 3 additions & 3 deletions tests/Menu.spec.js
Expand Up @@ -27,9 +27,9 @@ describe('Menu', function (){
it('Should call on select when item is selected', function (done) {
var count = 0;
function handleSelect(key) {
expect(key).to.be('2');
count++;
expect(key).to.be(count + '');
if (count == 2) {
if (count === 2) {
done();
}
}
Expand All @@ -41,7 +41,7 @@ describe('Menu', function (){
</MenuItem>
</Menu>
);
Simulate.click(instance.refs.item1.refs._anchor);
//Simulate.click(instance.refs.item1.refs._anchor);
Simulate.click(instance.refs.item2.refs._anchor);
});

Expand Down
4 changes: 0 additions & 4 deletions tests/MenuItem.spec.js
Expand Up @@ -30,8 +30,4 @@ describe('MenuItem', function (){
Simulate.click(TestUtils.findRenderedDOMComponentWithTag(instance, 'span'));
});


it('Should fire `onMouseLeave` event', function () {

});
});

0 comments on commit 8c989b2

Please sign in to comment.