Skip to content

Commit

Permalink
Prettierify
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoscielniak committed Feb 14, 2019
1 parent 108818b commit 665f454
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
17 changes: 4 additions & 13 deletions src/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ describe('AddToHomescreen Component', () => {
navigator.__defineGetter__('userAgent', () => 'iPhone');

const wrapper = shallow(<AddToHomescreen />);
assert.strictEqual(
wrapper.exists('.add-to-home-banner'),
true
);
assert.strictEqual(wrapper.exists('.add-to-home-banner'), true);

done();
});
Expand All @@ -22,10 +19,7 @@ describe('AddToHomescreen Component', () => {
navigator.__defineGetter__('userAgent', () => 'android');

const wrapper = shallow(<AddToHomescreen />);
assert.strictEqual(
wrapper.exists('.add-to-home-banner'),
false
);
assert.strictEqual(wrapper.exists('.add-to-home-banner'), false);

done();
});
Expand All @@ -36,7 +30,7 @@ describe('AddToHomescreen Component', () => {
const mockFunction = jest.fn();

const wrapper = shallow(
<AddToHomescreen onAddToHomescreenClick={mockFunction} />
<AddToHomescreen onAddToHomescreenClick={mockFunction} />,
);

wrapper.find('.add-to-home-text a').simulate('click');
Expand All @@ -51,10 +45,7 @@ describe('AddToHomescreen Component', () => {

wrapper.find('.add-to-home-close-btn').simulate('click');

assert.strictEqual(
wrapper.exists('.add-to-home-banner'),
false
);
assert.strictEqual(wrapper.exists('.add-to-home-banner'), false);

done();
});
Expand Down
6 changes: 1 addition & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ class AddToHomescreen extends React.Component {
{shouldRender ? (
<div className="add-to-home-banner">
<div className="add-to-home-text">
<a
onClick={this.onAddToHomescreenClick}
>
Add to home screen
</a>
<a onClick={this.onAddToHomescreenClick}>Add to home screen</a>
</div>
<MdClose
className="add-to-home-close-btn"
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ export const isIos = () => {
};

export const isInStandaloneMode = () =>
('standalone' in window.navigator) && window.navigator.standalone;
'standalone' in window.navigator && window.navigator.standalone;

0 comments on commit 665f454

Please sign in to comment.