Jest: Restore avatar tests
This commit is contained in:
parent
5ee3ec1114
commit
aed445954d
5 changed files with 8 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { fromJS } from 'immutable';
|
||||
import Avatar from '../avatar';
|
||||
import { Avatar } from '../avatar';
|
||||
|
||||
describe('<Avatar />', () => {
|
||||
const account = fromJS({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { fromJS } from 'immutable';
|
||||
import AvatarOverlay from '../avatar_overlay';
|
||||
import { AvatarOverlay } from '../avatar_overlay';
|
||||
|
||||
describe('<AvatarOverlay', () => {
|
||||
const account = fromJS({
|
||||
|
|
|
@ -8,8 +8,7 @@ const mapStateToProps = state => ({
|
|||
animate: getSettings(state).get('autoPlayGif'),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class Avatar extends React.PureComponent {
|
||||
export class Avatar extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
account: ImmutablePropTypes.map,
|
||||
|
@ -74,3 +73,5 @@ class Avatar extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(Avatar);
|
||||
|
|
|
@ -8,8 +8,7 @@ const mapStateToProps = state => ({
|
|||
animate: getSettings(state).get('autoPlayGif'),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class AvatarOverlay extends React.PureComponent {
|
||||
export class AvatarOverlay extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
account: ImmutablePropTypes.map.isRequired,
|
||||
|
@ -37,3 +36,5 @@ class AvatarOverlay extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(AvatarOverlay);
|
||||
|
|
|
@ -10,11 +10,6 @@ module.exports = {
|
|||
'<rootDir>/static/',
|
||||
'<rootDir>/tmp/',
|
||||
'<rootDir>/webpack/',
|
||||
|
||||
// Temporarily disable these tests
|
||||
// https://gitlab.com/soapbox-pub/soapbox-fe/-/issues/34
|
||||
'<rootDir>/app/soapbox/components/__tests__/avatar-test.js',
|
||||
'<rootDir>/app/soapbox/components/__tests__/avatar_overlay-test.js',
|
||||
],
|
||||
'setupFiles': [
|
||||
'raf/polyfill',
|
||||
|
|
Loading…
Reference in a new issue