1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-01-26 15:34:56 +01:00
Whalebird-desktop-client-ma.../spec/renderer/unit/store/Preferences/Notification.spec.ts
2019-04-06 22:08:29 +09:00

36 lines
826 B
TypeScript

import Notification, { NotificationState, MUTATION_TYPES } from '@/store/Preferences/Notification'
describe('Preferences/Notification', () => {
let state: NotificationState
beforeEach(() => {
state = {
notification: {
notify: {
reply: true,
reblog: true,
favourite: true,
follow: true
}
}
}
})
describe('mutations', () => {
it('updateNotification', () => {
Notification.mutations![MUTATION_TYPES.UPDATE_NOTIFICATION](state, {
notify: {
reply: false,
reblog: false,
favourite: false,
follow: false
}
})
expect(state.notification.notify).toEqual({
reply: false,
reblog: false,
favourite: false,
follow: false
})
})
})
})