Skip to content

Commit

Permalink
Add test for Settings component
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-username committed Mar 28, 2018
1 parent 2f4e210 commit 7dd1128
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/Settings.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';

import Settings from './Settings';

describe('Settings component test', () => {
it('should render as expected', () => {
const wrapper = shallow(<Settings />);
expect(wrapper).toMatchSnapshot();
});
});
46 changes: 46 additions & 0 deletions src/components/__snapshots__/Settings.test.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Settings component test should render as expected 1`] = `
<List>
<ListItem
chevronColor="#bdc6cf"
disabled={false}
hideChevron={true}
leftIconUnderlayColor="white"
onSwitch={[Function]}
rightIcon={
Object {
"name": "chevron-right",
}
}
rightTitleNumberOfLines={1}
roundAvatar={false}
subtitle="Enables passcode when opening the app"
subtitleNumberOfLines={1}
switchButton={true}
textInputEditable={true}
title="Passcode Protection"
titleNumberOfLines={1}
underlayColor="white"
/>
<ListItem
chevronColor="#bdc6cf"
disabled={false}
hideChevron={false}
leftIconUnderlayColor="white"
rightIcon={
Object {
"name": "chevron-right",
}
}
rightTitleNumberOfLines={1}
roundAvatar={false}
subtitleNumberOfLines={1}
switchButton={false}
textInputEditable={true}
title="Set Passcode"
titleNumberOfLines={1}
underlayColor="white"
/>
</List>
`;

0 comments on commit 7dd1128

Please sign in to comment.