test that i18n.locale is set to the value in the store

This commit is contained in:
Moriz Wahl 2022-01-24 17:01:26 +01:00
parent 26fbadb864
commit 6dca1536c8

View File

@ -15,7 +15,15 @@ jest.mock('vue-apollo')
jest.mock('vuex')
jest.mock('vue-i18n')
jest.mock('vue-moment')
jest.mock('./store/store')
jest.mock('./store/store', () => {
return {
state: {
moderator: {
language: 'es',
},
},
}
})
jest.mock('./i18n')
jest.mock('./router/router')
@ -101,4 +109,8 @@ describe('main', () => {
}),
)
})
it('sets the locale from store', () => {
expect(i18n.locale).toBe('es')
})
})