Skip to content

Commit

Permalink
cherry pick commit fbddc7b
Browse files Browse the repository at this point in the history
  • Loading branch information
binoy14 authored and cpenarrieta committed Apr 10, 2017
1 parent 3d4a79d commit 36d307b
Show file tree
Hide file tree
Showing 48 changed files with 3,621 additions and 21,739 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
"devDependencies": {
"babel": "^6.23.0",
"babel-core": "^6.23.1",
"babel-loader": "^6.3.2",
"webpack": "^2.2.1",
"babel-eslint": "^7.1.1",
"babel-jest": "^19.0.0",
"babel-loader": "^6.3.2",
"babel-preset-react-native": "^1.9.1",
"enzyme": "^2.7.1",
"enzyme-to-json": "^1.5.0",
"eslint": "^3.17.1",
"eslint-plugin-react": "^6.10.0",
"eslint-plugin-react-native": "^2.3.1",
Expand All @@ -50,7 +50,8 @@
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2",
"react-native": "^0.41.2",
"react-native-vector-icons": "^4.0.0"
"react-native-vector-icons": "^4.0.0",
"webpack": "^2.2.1"
},
"jest": {
"preset": "react-native",
Expand Down
15 changes: 8 additions & 7 deletions src/avatar/__tests__/Avatar.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from 'react';
import {shallow} from 'enzyme';
import toJson from 'enzyme-to-json';
import Avatar from '../Avatar';

describe('Badge Component', () => {
it('should render without issues', () => {
const component = shallow(<Avatar />);

expect(component.length).toBe(1);
expect(component).toMatchSnapshot();
expect(toJson(component)).toMatchSnapshot();
});

it('should render small avatar', () => {
Expand All @@ -20,7 +21,7 @@ describe('Badge Component', () => {
/>);

expect(component.length).toBe(1);
expect(component).toMatchSnapshot();
expect(toJson(component)).toMatchSnapshot();
});

it('should render medium avatar', () => {
Expand All @@ -32,7 +33,7 @@ describe('Badge Component', () => {
/>);

expect(component.length).toBe(1);
expect(component).toMatchSnapshot();
expect(toJson(component)).toMatchSnapshot();
});

it('should render large avatar', () => {
Expand All @@ -44,7 +45,7 @@ describe('Badge Component', () => {
/>);

expect(component.length).toBe(1);
expect(component).toMatchSnapshot();
expect(toJson(component)).toMatchSnapshot();
});

it('should render xlarge avatar', () => {
Expand All @@ -56,7 +57,7 @@ describe('Badge Component', () => {
/>);

expect(component.length).toBe(1);
expect(component).toMatchSnapshot();
expect(toJson(component)).toMatchSnapshot();
});

it('should render avatar without width', () => {
Expand All @@ -68,7 +69,7 @@ describe('Badge Component', () => {
/>);

expect(component.length).toBe(1);
expect(component).toMatchSnapshot();
expect(toJson(component)).toMatchSnapshot();
});

it('should render avatar without height', () => {
Expand All @@ -79,6 +80,6 @@ describe('Badge Component', () => {
/>);

expect(component.length).toBe(1);
expect(component).toMatchSnapshot();
expect(toJson(component)).toMatchSnapshot();
});
});
Loading

0 comments on commit 36d307b

Please sign in to comment.