Skip to content

Commit

Permalink
Added test for dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielbull committed Jul 28, 2016
1 parent 0e2e8dc commit 458d119
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/textInput/macOs/textInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,16 @@ class TextFieldOSX extends Component {
componentStyle.paddingRight = parseDimension(3.5 * ratio);
}

const input = FontSize(<input
key="element"
ref="element"
type="text"
style={componentStyle}
{...props}
/>, this.props);
const input = FontSize(
<input
key="element"
ref="element"
type="text"
style={componentStyle}
{...props}
/>,
this.props
);

return (Margin(
<div style={{ ...styles.container, ...(this.state.isFocused ? styles.containerFocus : {}), ...containerStyle }}>
Expand Down
11 changes: 11 additions & 0 deletions test/tests/dialog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { expect } from 'chai';
import React from 'react';
import { renderToString } from 'react-dom/server';
import Dialog from '../../src/dialog/macOs/dialog';

describe('Dialog', () => {
it('create osx dialog', () => {
const string = renderToString(<Dialog/>);
expect(string).to.match(/div/);
});
});

0 comments on commit 458d119

Please sign in to comment.