* Parse source URI * Revert "Parse source URI" This reverts commit 1cf421c9b9897e46881685aabebb793ad6ff4c07. * Pass imageUri instead of defaultSource to ProgressiveImage * Parse source URI in ImageCacheManager
23 lines
No EOL
591 B
JavaScript
23 lines
No EOL
591 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React from 'react';
|
|
import {shallow} from 'enzyme';
|
|
|
|
import PostAttachmentImage from './index';
|
|
|
|
describe('PostAttachmentImage', () => {
|
|
const baseProps = {
|
|
height: 100,
|
|
width: 100,
|
|
onError: jest.fn(),
|
|
onImagePress: jest.fn(),
|
|
uri: 'uri',
|
|
};
|
|
|
|
it('should match snapshot', () => {
|
|
const wrapper = shallow(<PostAttachmentImage {...baseProps}/>);
|
|
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
}); |