1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-01-05 21:37:58 +01:00
Whalebird-desktop-client-ma.../spec/renderer/unit/store/Preferences/General.spec.ts
2019-09-25 23:19:21 +09:00

38 lines
817 B
TypeScript

import General, { GeneralState, MUTATION_TYPES } from '@/store/Preferences/General'
describe('Preferences/General', () => {
let state: GeneralState
beforeEach(() => {
state = {
general: {
sound: {
fav_rb: true,
toot: true
},
timeline: {
cw: false,
nfsw: false,
hideAllAttachments: false
},
other: {
launch: false
}
},
loading: false
}
})
describe('mutations', () => {
it('updateGeneral', () => {
General.mutations![MUTATION_TYPES.UPDATE_GENERAL](state, {
sound: {
fav_rb: false,
toot: false
}
})
expect(state.general.sound.fav_rb).toEqual(false)
expect(state.general.sound.toot).toEqual(false)
})
})
})