fix tests

This commit is contained in:
Henry Jameson 2023-11-19 17:27:51 +02:00
parent c0e2ba37c8
commit cdc0959135
1 changed files with 31 additions and 35 deletions

View File

@ -5,26 +5,24 @@ describe('NotificationUtils', () => {
it('should return sorted notifications with configured types', () => {
const store = {
state: {
statuses: {
notifications: {
data: [
{
id: 1,
action: { id: '1' },
type: 'like'
},
{
id: 2,
action: { id: '2' },
type: 'mention'
},
{
id: 3,
action: { id: '3' },
type: 'repeat'
}
]
}
notifications: {
data: [
{
id: 1,
action: { id: '1' },
type: 'like'
},
{
id: 2,
action: { id: '2' },
type: 'mention'
},
{
id: 3,
action: { id: '3' },
type: 'repeat'
}
]
},
config: {
notificationVisibility: {
@ -55,21 +53,19 @@ describe('NotificationUtils', () => {
it('should return only notifications not marked as seen', () => {
const store = {
state: {
statuses: {
notifications: {
data: [
{
action: { id: '1' },
type: 'like',
seen: false
},
{
action: { id: '2' },
type: 'mention',
seen: true
}
]
}
notifications: {
data: [
{
action: { id: '1' },
type: 'like',
seen: false
},
{
action: { id: '2' },
type: 'mention',
seen: true
}
]
},
config: {
notificationVisibility: {