修改ESLint问题
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
import {mount, createLocalVue} from '@vue/test-utils'
 | 
			
		||||
import { mount, createLocalVue } from '@vue/test-utils'
 | 
			
		||||
import VueRouter from 'vue-router'
 | 
			
		||||
import ElementUI from 'element-ui'
 | 
			
		||||
import Breadcrumb from '@/components/Breadcrumb/index.vue'
 | 
			
		||||
@@ -22,27 +22,27 @@ const routes = [
 | 
			
		||||
    children: [{
 | 
			
		||||
      path: 'menu1',
 | 
			
		||||
      name: 'menu1',
 | 
			
		||||
      meta: {title: 'menu1'},
 | 
			
		||||
      meta: { title: 'menu1' },
 | 
			
		||||
      children: [{
 | 
			
		||||
        path: 'menu1-1',
 | 
			
		||||
        name: 'menu1-1',
 | 
			
		||||
        meta: {title: 'menu1-1'}
 | 
			
		||||
        meta: { title: 'menu1-1' }
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        path: 'menu1-2',
 | 
			
		||||
        name: 'menu1-2',
 | 
			
		||||
        redirect: 'noredirect',
 | 
			
		||||
        meta: { title: 'menu1-2' },
 | 
			
		||||
        children: [{
 | 
			
		||||
          path: 'menu1-2-1',
 | 
			
		||||
          name: 'menu1-2-1',
 | 
			
		||||
          meta: { title: 'menu1-2-1' }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          path: 'menu1-2',
 | 
			
		||||
          name: 'menu1-2',
 | 
			
		||||
          redirect: 'noredirect',
 | 
			
		||||
          meta: {title: 'menu1-2'},
 | 
			
		||||
          children: [{
 | 
			
		||||
            path: 'menu1-2-1',
 | 
			
		||||
            name: 'menu1-2-1',
 | 
			
		||||
            meta: {title: 'menu1-2-1'}
 | 
			
		||||
          },
 | 
			
		||||
            {
 | 
			
		||||
              path: 'menu1-2-2',
 | 
			
		||||
              name: 'menu1-2-2'
 | 
			
		||||
            }]
 | 
			
		||||
          path: 'menu1-2-2',
 | 
			
		||||
          name: 'menu1-2-2'
 | 
			
		||||
        }]
 | 
			
		||||
      }]
 | 
			
		||||
    }]
 | 
			
		||||
  }]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import {shallowMount} from '@vue/test-utils'
 | 
			
		||||
import { shallowMount } from '@vue/test-utils'
 | 
			
		||||
import Hamburger from '@/components/Hamburger/index.vue'
 | 
			
		||||
 | 
			
		||||
describe('Hamburger.vue', () => {
 | 
			
		||||
@@ -11,9 +11,9 @@ describe('Hamburger.vue', () => {
 | 
			
		||||
  })
 | 
			
		||||
  it('prop isActive', () => {
 | 
			
		||||
    const wrapper = shallowMount(Hamburger)
 | 
			
		||||
    wrapper.setProps({isActive: true})
 | 
			
		||||
    wrapper.setProps({ isActive: true })
 | 
			
		||||
    expect(wrapper.contains('.is-active')).toBe(true)
 | 
			
		||||
    wrapper.setProps({isActive: false})
 | 
			
		||||
    wrapper.setProps({ isActive: false })
 | 
			
		||||
    expect(wrapper.contains('.is-active')).toBe(false)
 | 
			
		||||
  })
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import {shallowMount} from '@vue/test-utils'
 | 
			
		||||
import { shallowMount } from '@vue/test-utils'
 | 
			
		||||
import SvgIcon from '@/components/SvgIcon/index.vue'
 | 
			
		||||
 | 
			
		||||
describe('SvgIcon.vue', () => {
 | 
			
		||||
@@ -17,7 +17,7 @@ describe('SvgIcon.vue', () => {
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
    expect(wrapper.classes().length).toBe(1)
 | 
			
		||||
    wrapper.setProps({className: 'test'})
 | 
			
		||||
    wrapper.setProps({ className: 'test' })
 | 
			
		||||
    expect(wrapper.classes().includes('test')).toBe(true)
 | 
			
		||||
  })
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import {formatTime} from '@/utils/index.js'
 | 
			
		||||
import { formatTime } from '@/utils/index.js'
 | 
			
		||||
 | 
			
		||||
describe('Utils:formatTime', () => {
 | 
			
		||||
  const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import {param2Obj} from '@/utils/index.js'
 | 
			
		||||
import { param2Obj } from '@/utils/index.js'
 | 
			
		||||
 | 
			
		||||
describe('Utils:param2Obj', () => {
 | 
			
		||||
  const url = 'https://github.com/PanJiaChen/vue-element-admin?name=bill&age=29&sex=1&field=dGVzdA==&key=%E6%B5%8B%E8%AF%95'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import {parseTime} from '@/utils/index.js'
 | 
			
		||||
import { parseTime } from '@/utils/index.js'
 | 
			
		||||
 | 
			
		||||
describe('Utils:parseTime', () => {
 | 
			
		||||
  const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import {validUsername, isExternal} from '@/utils/validate.js'
 | 
			
		||||
import { validUsername, isExternal } from '@/utils/validate.js'
 | 
			
		||||
 | 
			
		||||
describe('Utils:validate', () => {
 | 
			
		||||
  it('validUsername', () => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user