/* eslint-disable no-undef */
import { themes } from '../../lib/constants';
import { getUnreadStyle } from './getUnreadStyle';
const testsForTheme = theme => {
const getUnreadStyleUtil = ({ ...props }) => getUnreadStyle({ theme, ...props });
test('render empty', () => {
expect(getUnreadStyleUtil({})).toEqual({});
});
test('render unread', () => {
expect(
getUnreadStyleUtil({
unread: 1
})
).toEqual({
backgroundColor: themes[theme].unreadColor,
color: themes[theme].buttonText
test('render thread unread', () => {
tunread: [1]
backgroundColor: themes[theme].tunreadColor,
test('render user mention', () => {
unread: 1,
userMentions: 1
backgroundColor: themes[theme].mentionMeColor,
test('render group mention', () => {
groupMentions: 1
backgroundColor: themes[theme].mentionGroupColor,
test('mentions priority', () => {
userMentions: 1,
groupMentions: 1,
};
describe('getUnreadStyle light theme', () => testsForTheme('light'));
describe('getUnreadStyle dark theme', () => testsForTheme('dark'));
describe('getUnreadStyle black theme', () => testsForTheme('black'));