Skip to content

Commit 458d119

Browse files
committed
Added test for dialog
1 parent 0e2e8dc commit 458d119

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

src/textInput/macOs/textInput.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,16 @@ class TextFieldOSX extends Component {
145145
componentStyle.paddingRight = parseDimension(3.5 * ratio);
146146
}
147147

148-
const input = FontSize(<input
149-
key="element"
150-
ref="element"
151-
type="text"
152-
style={componentStyle}
153-
{...props}
154-
/>, this.props);
148+
const input = FontSize(
149+
<input
150+
key="element"
151+
ref="element"
152+
type="text"
153+
style={componentStyle}
154+
{...props}
155+
/>,
156+
this.props
157+
);
155158

156159
return (Margin(
157160
<div style={{ ...styles.container, ...(this.state.isFocused ? styles.containerFocus : {}), ...containerStyle }}>

test/tests/dialog.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { expect } from 'chai';
2+
import React from 'react';
3+
import { renderToString } from 'react-dom/server';
4+
import Dialog from '../../src/dialog/macOs/dialog';
5+
6+
describe('Dialog', () => {
7+
it('create osx dialog', () => {
8+
const string = renderToString(<Dialog/>);
9+
expect(string).to.match(/div/);
10+
});
11+
});

0 commit comments

Comments
 (0)