refs #209 Fix mock store for Preferences/General
This commit is contained in:
parent
d95dbfa559
commit
bdb3b71318
|
@ -28,6 +28,15 @@ const initStore = () => {
|
|||
}
|
||||
}
|
||||
|
||||
const app = {
|
||||
namespaced: true,
|
||||
actions: {
|
||||
loadPreferences (_) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
describe('Preferences/General', () => {
|
||||
let store
|
||||
let localVue
|
||||
|
@ -37,7 +46,8 @@ describe('Preferences/General', () => {
|
|||
localVue.use(Vuex)
|
||||
store = new Vuex.Store({
|
||||
modules: {
|
||||
Preferences: initStore()
|
||||
Preferences: initStore(),
|
||||
App: app
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -71,7 +71,7 @@ describe('AddListMember', () => {
|
|||
}
|
||||
|
||||
Mastodon.mockImplementation(() => mockClient)
|
||||
const accounts = await store.dispatch('AddListMember/search', 'akira')
|
||||
await store.dispatch('AddListMember/search', 'akira')
|
||||
expect(store.state.AddListMember.accounts).toEqual([
|
||||
{ id: 1, name: 'h3poteto' },
|
||||
{ id: 2, name: 'akito19' }
|
||||
|
|
Loading…
Reference in New Issue