quick fix on failing unit test with custom expiry status (#5566)
This commit is contained in:
parent
14d377e713
commit
7d6a48d8cb
1 changed files with 5 additions and 2 deletions
|
|
@ -5,12 +5,16 @@ import React from 'react';
|
|||
import moment from 'moment-timezone';
|
||||
|
||||
import Preferences from '@mm-redux/constants/preferences';
|
||||
import * as PreferenceSelectors from '@mm-redux/selectors/entities/preferences';
|
||||
import {renderWithReduxIntl} from 'test/testing_library';
|
||||
import CustomStatusExpiry from './custom_status_expiry';
|
||||
|
||||
jest.mock('@mm-redux/selectors/entities/preferences');
|
||||
|
||||
jest.mock('@mm-redux/selectors/entities/preferences', () => ({
|
||||
getBool: jest.fn().mockReturnValue(false),
|
||||
isCollapsedThreadsEnabled: jest.fn(),
|
||||
}));
|
||||
|
||||
describe('components/custom_status/custom_status_expiry', () => {
|
||||
const date = moment().endOf('day');
|
||||
|
||||
|
|
@ -19,7 +23,6 @@ describe('components/custom_status/custom_status_expiry', () => {
|
|||
time: date.toDate(),
|
||||
};
|
||||
|
||||
(PreferenceSelectors.getBool as jest.Mock).mockReturnValue(false);
|
||||
it('should match snapshot', () => {
|
||||
const wrapper = renderWithReduxIntl(
|
||||
<CustomStatusExpiry
|
||||
|
|
|
|||
Loading…
Reference in a new issue