🐛 fix problem with name exports

This commit is contained in:
ghalestrilo 2020-05-01 13:17:59 -03:00
parent d63a88bc49
commit 914e48b099
2 changed files with 6 additions and 5 deletions

View file

@ -1,6 +1,6 @@
import React from 'react';
import { shallow } from 'enzyme';
import { Toolbar } from '../../modules/IDE/components/Toolbar';
import { ToolbarComponent } from '../../modules/IDE/components/Toolbar';
const initialProps = {
@ -33,7 +33,7 @@ const initialProps = {
};
describe('<Toolbar />', () => {
describe('<ToolbarComponent />', () => {
let component;
let props = initialProps;
let input;
@ -63,7 +63,7 @@ describe('<Toolbar />', () => {
describe('with valid props', () => {
beforeEach(() => {
setProps();
component = shallow(<Toolbar {...props} />);
component = shallow(<ToolbarComponent {...props} />);
});
it('renders', () => expect(component).toBeDefined());
@ -76,7 +76,7 @@ describe('<Toolbar />', () => {
project: { isEditingName: true, name: 'testname' },
setProjectName: jest.fn(name => component.setProps({ project: { name } })),
});
component = shallow(<Toolbar {...props} />);
component = shallow(<ToolbarComponent {...props} />);
});
describe('to a valid name', () => {

View file

@ -14,7 +14,7 @@ const stopUrl = require('../../../images/stop.svg');
const preferencesUrl = require('../../../images/preferences.svg');
const editProjectNameUrl = require('../../../images/pencil.svg');
export class Toolbar extends React.Component {
class Toolbar extends React.Component {
constructor(props) {
super(props);
this.handleKeyPress = this.handleKeyPress.bind(this);
@ -210,4 +210,5 @@ const mapDispatchToProps = {
...projectActions,
};
export const ToolbarComponent = Toolbar;
export default connect(mapStateToProps, mapDispatchToProps)(Toolbar);