Ocelot-Social/webapp/store/editor.spec.js
Matt Rider e583486143 Set up editor placeholder to use Vuex
- to make reactive
- safer than using global event buses ($root.$emit)

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
Co-authored-by: Mike Aono <aonomike@gmail.com>
2019-06-15 15:23:51 -03:00

21 lines
504 B
JavaScript

import { getters, mutations } from './editor.js'
let state
describe('getters', () => {
describe('placeholder', () => {
it('return the value in state', () => {
state = { placeholder: null }
expect(getters.placeholder(state)).toBe(null)
})
})
})
describe('mutations', () => {
it('SET_PLACEHOLDER_TEXT', () => {
state = { placeholder: null }
mutations.SET_PLACEHOLDER_TEXT(state, 'new placeholder')
expect(getters.placeholder(state)).toBe('new placeholder')
})
})