mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-22 14:50:33 +03:00
chore: fix lint
This commit is contained in:
@@ -110,7 +110,7 @@ describe('client', () => {
|
||||
|
||||
const Component = Vue.extend({
|
||||
metaInfo: { title: 'Test' },
|
||||
render(h) {
|
||||
render (h) {
|
||||
return h('div', null, 'Test')
|
||||
}
|
||||
})
|
||||
@@ -157,10 +157,10 @@ describe('client', () => {
|
||||
localVue: Vue,
|
||||
mocks: {
|
||||
$router: {
|
||||
beforeEach(fn) {
|
||||
beforeEach (fn) {
|
||||
guards.before = fn
|
||||
},
|
||||
afterEach(fn) {
|
||||
afterEach (fn) {
|
||||
guards.after = fn
|
||||
}
|
||||
}
|
||||
@@ -192,10 +192,10 @@ describe('client', () => {
|
||||
localVue: Vue,
|
||||
mocks: {
|
||||
$router: {
|
||||
beforeEach(fn) {
|
||||
beforeEach (fn) {
|
||||
guards.before = fn
|
||||
},
|
||||
afterEach(fn) {
|
||||
afterEach (fn) {
|
||||
guards.after = fn
|
||||
}
|
||||
}
|
||||
@@ -225,21 +225,21 @@ describe('client', () => {
|
||||
// this component uses a computed prop to simulate a non-synchronous
|
||||
// metaInfo update like you would have with a Vuex mutation
|
||||
const Component = Vue.extend({
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
hiddenTheme: 'light'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
theme () {
|
||||
return this.hiddenTheme
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
beforeMount () {
|
||||
this.hiddenTheme = 'dark'
|
||||
},
|
||||
render: h => h('div'),
|
||||
metaInfo() {
|
||||
metaInfo () {
|
||||
return {
|
||||
htmlAttrs: {
|
||||
theme: this.theme
|
||||
@@ -270,21 +270,21 @@ describe('client', () => {
|
||||
document.body.appendChild(el)
|
||||
|
||||
const Component = Vue.extend({
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
hiddenTheme: 'light'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
theme () {
|
||||
return this.hiddenTheme
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
mounted () {
|
||||
this.hiddenTheme = 'dark'
|
||||
},
|
||||
render: h => h('div'),
|
||||
metaInfo() {
|
||||
metaInfo () {
|
||||
return {
|
||||
htmlAttrs: {
|
||||
theme: this.theme
|
||||
|
||||
@@ -23,7 +23,7 @@ describe('getComponentOption', () => {
|
||||
test('calls a function option, injecting the component as context', () => {
|
||||
const component = new Vue({
|
||||
name: 'Foobar',
|
||||
someFunc() {
|
||||
someFunc () {
|
||||
return { opt: this.$options.name }
|
||||
}
|
||||
})
|
||||
@@ -90,13 +90,13 @@ describe('getComponentOption', () => {
|
||||
|
||||
localVue.component('meta-child', {
|
||||
foo: { bar: 'baz' },
|
||||
render(h) {
|
||||
render (h) {
|
||||
return h('div', this.$slots.default)
|
||||
}
|
||||
})
|
||||
|
||||
localVue.component('nometa-child', {
|
||||
render(h) {
|
||||
render (h) {
|
||||
return h('div', this.$slots.default)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -208,7 +208,7 @@ describe('getMetaInfo', () => {
|
||||
{ charset: 'utf-8' }
|
||||
]
|
||||
},
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
helloWorldText: 'Function World'
|
||||
}
|
||||
@@ -648,7 +648,7 @@ describe('getMetaInfo', () => {
|
||||
|
||||
test('no errors when metaInfo returns nothing', () => {
|
||||
const component = new Vue({
|
||||
metaInfo() {},
|
||||
metaInfo () {},
|
||||
el: document.createElement('div'),
|
||||
render: h => h('div', null, [])
|
||||
})
|
||||
|
||||
@@ -90,7 +90,7 @@ describe('plugin', () => {
|
||||
})
|
||||
|
||||
const Component = Vue.component('test-component', {
|
||||
metaInfo() {
|
||||
metaInfo () {
|
||||
return {
|
||||
title: this.title
|
||||
}
|
||||
@@ -161,7 +161,7 @@ describe('plugin', () => {
|
||||
})
|
||||
|
||||
const Component = Vue.component('test-component', {
|
||||
metaInfo() {
|
||||
metaInfo () {
|
||||
return {
|
||||
title: this.title
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user