File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 9696 "karma-sourcemap-loader" : " ^0.3.7" ,
9797 "karma-webpack" : " ^1.7.0" ,
9898 "mocha" : " ^2.2.5" ,
99+ "nodemon" : " ^1.9.1" ,
99100 "phantomjs" : " ^1.9.17" ,
100101 "react" : " ^0.14.0" ,
101102 "react-addons-test-utils" : " ^0.14.7" ,
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ const Snackbar = React.createClass({
119119 *
120120 * @param {string } reason Can be:`"timeout"` (`autoHideDuration` expired) or: `"clickaway"`
121121 */
122- onRequestClose : React . PropTypes . func . isRequired ,
122+ onRequestClose : React . PropTypes . func ,
123123
124124 /**
125125 * Controls whether the `Snackbar` is opened or not.
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { shallow } from 'enzyme' ;
3+ import { assert } from 'chai' ;
4+ import Snackbar from 'src/snackbar' ;
5+
6+ describe ( '<Snackbar />' , ( ) => {
7+ it ( 'renders hidden by default' , ( ) => {
8+ const wrapper = shallow (
9+ < Snackbar open = { false } message = "Message" autoHideDuration = { 4000 } />
10+ ) ;
11+
12+ assert . equal (
13+ wrapper . find ( 'div' ) . at ( 0 ) . node . props . style . visibility ,
14+ 'hidden' ,
15+ 'visibility should be hidden'
16+ ) ;
17+ } ) ;
18+ } ) ;
You can’t perform that action at this time.
0 commit comments