🐛 fix problem with name exports
This commit is contained in:
		
							parent
							
								
									d63a88bc49
								
							
						
					
					
						commit
						914e48b099
					
				
					 2 changed files with 6 additions and 5 deletions
				
			
		|  | @ -1,6 +1,6 @@ | ||||||
| import React from 'react'; | import React from 'react'; | ||||||
| import { shallow } from 'enzyme'; | import { shallow } from 'enzyme'; | ||||||
| import { Toolbar } from '../../modules/IDE/components/Toolbar'; | import { ToolbarComponent } from '../../modules/IDE/components/Toolbar'; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| const initialProps = { | const initialProps = { | ||||||
|  | @ -33,7 +33,7 @@ const initialProps = { | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| describe('<Toolbar />', () => { | describe('<ToolbarComponent />', () => { | ||||||
|   let component; |   let component; | ||||||
|   let props = initialProps; |   let props = initialProps; | ||||||
|   let input; |   let input; | ||||||
|  | @ -63,7 +63,7 @@ describe('<Toolbar />', () => { | ||||||
|   describe('with valid props', () => { |   describe('with valid props', () => { | ||||||
|     beforeEach(() => { |     beforeEach(() => { | ||||||
|       setProps(); |       setProps(); | ||||||
|       component = shallow(<Toolbar {...props} />); |       component = shallow(<ToolbarComponent {...props} />); | ||||||
|     }); |     }); | ||||||
|     it('renders', () => expect(component).toBeDefined()); |     it('renders', () => expect(component).toBeDefined()); | ||||||
| 
 | 
 | ||||||
|  | @ -76,7 +76,7 @@ describe('<Toolbar />', () => { | ||||||
|             project: { isEditingName: true, name: 'testname' }, |             project: { isEditingName: true, name: 'testname' }, | ||||||
|             setProjectName: jest.fn(name => component.setProps({ project: { name } })), |             setProjectName: jest.fn(name => component.setProps({ project: { name } })), | ||||||
|           }); |           }); | ||||||
|           component = shallow(<Toolbar {...props} />); |           component = shallow(<ToolbarComponent {...props} />); | ||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         describe('to a valid name', () => { |         describe('to a valid name', () => { | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ const stopUrl = require('../../../images/stop.svg'); | ||||||
| const preferencesUrl = require('../../../images/preferences.svg'); | const preferencesUrl = require('../../../images/preferences.svg'); | ||||||
| const editProjectNameUrl = require('../../../images/pencil.svg'); | const editProjectNameUrl = require('../../../images/pencil.svg'); | ||||||
| 
 | 
 | ||||||
| export class Toolbar extends React.Component { | class Toolbar extends React.Component { | ||||||
|   constructor(props) { |   constructor(props) { | ||||||
|     super(props); |     super(props); | ||||||
|     this.handleKeyPress = this.handleKeyPress.bind(this); |     this.handleKeyPress = this.handleKeyPress.bind(this); | ||||||
|  | @ -210,4 +210,5 @@ const mapDispatchToProps = { | ||||||
|   ...projectActions, |   ...projectActions, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | export const ToolbarComponent = Toolbar; | ||||||
| export default connect(mapStateToProps, mapDispatchToProps)(Toolbar); | export default connect(mapStateToProps, mapDispatchToProps)(Toolbar); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 ghalestrilo
						ghalestrilo