Created
September 16, 2017 15:02
-
-
Save bmfteixeira/383b4af1406db13ac593fe9d26ccc4ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the mutation | |
[mutationTypes.MUTATION_SET_FAV_ELEM] (state, elemId) { | |
state.favElem = elemId | |
} | |
// the test | |
it('should set state.favElem', () => { | |
const state = { | |
favElem: '' | |
} | |
mutations[mutationTypes.MUTATION_SET_FAV_ELEM](state, 'AAA') | |
expect(state.favElem).to.equal('AAA') | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment