Commit 09f10445 authored by Sendya's avatar Sendya

fix: util lint

parent 6e5ce3ba
export const setDocumentTitle = function (title) { export const setDocumentTitle = function (title) {
document.title = title document.title = title
const ua = navigator.userAgent const ua = navigator.userAgent
// eslint-disable-next-line // eslint-disable-next-line
const regex = /\bMicroMessenger\/([\d\.]+)/ const regex = /\bMicroMessenger\/([\d\.]+)/
if (regex.test(ua) && /ip(hone|od|ad)/i.test(ua)) { if (regex.test(ua) && /ip(hone|od|ad)/i.test(ua)) {
const i = document.createElement('iframe') const i = document.createElement('iframe')
i.src = '/favicon.ico' i.src = '/favicon.ico'
i.style.display = 'none' i.style.display = 'none'
i.onload = function () { i.onload = function () {
setTimeout(function () { setTimeout(function () {
i.remove() i.remove()
}, 9) }, 9)
} }
document.body.appendChild(i) document.body.appendChild(i)
} }
} }
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import BlockLayout from '../src/BlockLayout' import BlockLayout from '../src/BlockLayout'
describe('BlockLayout', () => { describe('BlockLayout', () => {
it('should render BlockLayout', () => { it('should render BlockLayout', () => {
const wrapper = mount({ const wrapper = mount({
render () { render () {
return ( return (
<div> <div>
<BlockLayout> <BlockLayout>
<span>demo</span> <span>demo</span>
</BlockLayout> </BlockLayout>
</div> </div>
) )
} }
}) })
expect(wrapper).toMatchSnapshot() expect(wrapper).toMatchSnapshot()
}) })
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment