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 React from 'react';
|
||||||
import renderer from 'react-test-renderer';
|
import renderer from 'react-test-renderer';
|
||||||
import { fromJS } from 'immutable';
|
import { fromJS } from 'immutable';
|
||||||
import Avatar from '../avatar';
|
import { Avatar } from '../avatar';
|
||||||
|
|
||||||
describe('<Avatar />', () => {
|
describe('<Avatar />', () => {
|
||||||
const account = fromJS({
|
const account = fromJS({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import renderer from 'react-test-renderer';
|
import renderer from 'react-test-renderer';
|
||||||
import { fromJS } from 'immutable';
|
import { fromJS } from 'immutable';
|
||||||
import AvatarOverlay from '../avatar_overlay';
|
import { AvatarOverlay } from '../avatar_overlay';
|
||||||
|
|
||||||
describe('<AvatarOverlay', () => {
|
describe('<AvatarOverlay', () => {
|
||||||
const account = fromJS({
|
const account = fromJS({
|
||||||
|
|
|
@ -8,8 +8,7 @@ const mapStateToProps = state => ({
|
||||||
animate: getSettings(state).get('autoPlayGif'),
|
animate: getSettings(state).get('autoPlayGif'),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default @connect(mapStateToProps)
|
export class Avatar extends React.PureComponent {
|
||||||
class Avatar extends React.PureComponent {
|
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
account: ImmutablePropTypes.map,
|
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'),
|
animate: getSettings(state).get('autoPlayGif'),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default @connect(mapStateToProps)
|
export class AvatarOverlay extends React.PureComponent {
|
||||||
class AvatarOverlay extends React.PureComponent {
|
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
account: ImmutablePropTypes.map.isRequired,
|
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>/static/',
|
||||||
'<rootDir>/tmp/',
|
'<rootDir>/tmp/',
|
||||||
'<rootDir>/webpack/',
|
'<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': [
|
'setupFiles': [
|
||||||
'raf/polyfill',
|
'raf/polyfill',
|
||||||
|
|
Loading…
Reference in a new issue