import React from 'react';
import { View } from 'react-native';
import { shallow } from 'enzyme';
import RemoteImage from './';
jest.mock('react-redux', () => ({
...jest.requireActual('react-redux'),
useSelector: jest
.fn()
.mockImplementation(() => 'https://cloudflare-ipfs.com/ipfs/'),
}));
describe('RemoteImage', () => {
it('should render svg correctly', () => {
const wrapper = shallow(
,
);
expect(wrapper).toMatchSnapshot();
});
it('should render static sources', () => {
const wrapper = shallow(
,
);
expect(wrapper).toMatchSnapshot();
});
it('should render ipfs sources', () => {
const wrapper = shallow(
,
);
expect(wrapper).toMatchSnapshot();
});
});