made it work
This commit is contained in:
parent
6967151275
commit
496099bb00
4 changed files with 44 additions and 30 deletions
|
|
@ -1,6 +1,21 @@
|
|||
import { createTestingPinia } from '@pinia/testing'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import * as NotificationUtils from 'src/services/notification_utils/notification_utils.js'
|
||||
|
||||
describe('NotificationUtils', () => {
|
||||
beforeEach(() => {
|
||||
const store = useSyncConfigStore(createTestingPinia())
|
||||
store.mergedConfig = {
|
||||
notificationVisibility: {
|
||||
likes: true,
|
||||
repeats: true,
|
||||
mentions: false,
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
describe('filteredNotificationsFromStore', () => {
|
||||
it('should return sorted notifications with configured types', () => {
|
||||
const store = {
|
||||
|
|
@ -25,15 +40,6 @@ describe('NotificationUtils', () => {
|
|||
],
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
mergedConfig: {
|
||||
notificationVisibility: {
|
||||
likes: true,
|
||||
repeats: true,
|
||||
mentions: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
const expected = [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue