Last active
September 8, 2018 21:31
-
-
Save kuroski/d1d0c1e82f8bfb94eff86cc7c2eb738e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import mutations from '@/store/mutations' | |
import initialState from '@/store/state' | |
import user from './fixtures/user' | |
describe('mutations', () => { | |
let state | |
beforeEach(() => { | |
state = { ...initialState } | |
}) | |
it('sets new user', () => { | |
// arrange | |
const expectedUser = user | |
// act | |
mutations.SET_USER(state, expectedUser) | |
// assert | |
expect(state.user).toEqual(expectedUser) | |
expect(state.user).not.toBe(expectedUser) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment