mutations.spec.js 323 B

12345678910111213
  1. import { expect } from 'chai'
  2. import mutations from 'src/vuex/user/mutations'
  3. var state = {
  4. loginResult: ''
  5. }
  6. describe('user mutations', () => {
  7. it('提示错误信息', () => {
  8. mutations.SET_ERROR_INFO(state, '账号或者密码错误')
  9. expect(state.loginResult).to.equal('账号或者密码错误')
  10. })
  11. })