mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 05:59:55 +02:00
See #262: light messaging area and helpers for the front-end
This commit is contained in:
parent
4c81de9226
commit
3634c00ee6
6 changed files with 167 additions and 2 deletions
18
front/test/unit/specs/store/ui.spec.js
Normal file
18
front/test/unit/specs/store/ui.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
import store from '@/store/ui'
|
||||
|
||||
import { testAction } from '../../utils'
|
||||
|
||||
describe('store/ui', () => {
|
||||
describe('mutations', () => {
|
||||
it('addMessage', () => {
|
||||
const state = {maxMessages: 100, messages: []}
|
||||
store.mutations.addMessage(state, 'hello')
|
||||
expect(state.messages).to.deep.equal(['hello'])
|
||||
})
|
||||
it('addMessage', () => {
|
||||
const state = {maxMessages: 1, messages: ['hello']}
|
||||
store.mutations.addMessage(state, 'world')
|
||||
expect(state.messages).to.deep.equal(['world'])
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue