mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
- 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>
21 lines
504 B
JavaScript
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')
|
|
})
|
|
})
|