See #262: light messaging area and helpers for the front-end

This commit is contained in:
Eliot Berriot 2018-06-07 12:59:22 +02:00
parent 4c81de9226
commit 3634c00ee6
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
6 changed files with 167 additions and 2 deletions

View 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'])
})
})
})