Skip to content

Commit 914e48b

Browse files
committed
🐛 fix problem with name exports
1 parent d63a88b commit 914e48b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

client/components/__test__/Toolbar.test.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { shallow } from 'enzyme';
3-
import { Toolbar } from '../../modules/IDE/components/Toolbar';
3+
import { ToolbarComponent } from '../../modules/IDE/components/Toolbar';
44

55

66
const initialProps = {
@@ -33,7 +33,7 @@ const initialProps = {
3333
};
3434

3535

36-
describe('<Toolbar />', () => {
36+
describe('<ToolbarComponent />', () => {
3737
let component;
3838
let props = initialProps;
3939
let input;
@@ -63,7 +63,7 @@ describe('<Toolbar />', () => {
6363
describe('with valid props', () => {
6464
beforeEach(() => {
6565
setProps();
66-
component = shallow(<Toolbar {...props} />);
66+
component = shallow(<ToolbarComponent {...props} />);
6767
});
6868
it('renders', () => expect(component).toBeDefined());
6969

@@ -76,7 +76,7 @@ describe('<Toolbar />', () => {
7676
project: { isEditingName: true, name: 'testname' },
7777
setProjectName: jest.fn(name => component.setProps({ project: { name } })),
7878
});
79-
component = shallow(<Toolbar {...props} />);
79+
component = shallow(<ToolbarComponent {...props} />);
8080
});
8181

8282
describe('to a valid name', () => {

client/modules/IDE/components/Toolbar.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const stopUrl = require('../../../images/stop.svg');
1414
const preferencesUrl = require('../../../images/preferences.svg');
1515
const editProjectNameUrl = require('../../../images/pencil.svg');
1616

17-
export class Toolbar extends React.Component {
17+
class Toolbar extends React.Component {
1818
constructor(props) {
1919
super(props);
2020
this.handleKeyPress = this.handleKeyPress.bind(this);
@@ -210,4 +210,5 @@ const mapDispatchToProps = {
210210
...projectActions,
211211
};
212212

213+
export const ToolbarComponent = Toolbar;
213214
export default connect(mapStateToProps, mapDispatchToProps)(Toolbar);

0 commit comments

Comments
 (0)